Bat.view_obj={
'dao.hb.PrjMilestones' : {
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "prjId","compTime","actCompTime", "description"],["prjName"]],
						"cns" : ["dao.hb.PrjMilestones","dao.hb.PrjProject"],
						"hql" : "from dao.hb.PrjMilestones A,dao.hb.PrjProject B where A.prjId=B.prjId order by A.id desc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField"
		},
		propdef : {
			"A.id" : {
				display : '编号',
				cfg:{
					readOnly:true
				}
			},
			"A.prjId" : {
				display : '项目编号',
				editor:"ComboBox",
		 		cfg:{
		 		   listWidth:200,
		 		   width:100,
			       store:getStore({hql:"select prjId,prjName from dao.hb.PrjProject  order by id"}),
			        displayField:'name',
			        valueField:'id',
			        typeAhead: true,
			        mode: 'local',
			        triggerAction: 'all',
			        emptyText:'...',
			        selectOnFocus:true
		        }
			},
			"A.compTime" : {
				display : '预计完成时间'	,
			 	   editor:'DateField',
		           renderer:function(val){
					if(val!=null&&val.time){
						return renderDate(val);
					}else{
						return Ext.util.Format.date(val,"Y-m-d");
					}
				   }      
			},
			"A.actCompTime" : {
				display : '实际完成时间',
			 	   editor:'DateField',
		           renderer:function(val){
					if(val!=null&&val.time){
						return renderDate(val);
					}else{
						return Ext.util.Format.date(val,"Y-m-d");
					}
			  }      
			},
			"A.description" : {
				display : '描述',
				editor:'TextArea'
			},			
			"B.prjName" : {
				display : '项目名称'
			}			
		},
		grid : {
			hide: ['question','answer'],
			page : true,
			btns : ['打开','保存','增加','删除','检索', '排序','刷新']
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '详细信息',
				titlefunc : function(robj) {
					return '项目详细[' + robj.items.map['A.prjId'] +']';
				}
			},
			tab : [{
					title : "基本信息",
					fset : [{
						legend : " ",
						props : ["A.id", "A.prjId","A.compTime","A.actCompTime","A.description"]
				}]
			}]
		}
	},	
		
	'dao.hb.PrjMinutes' : {
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "prjId","theme","meetingsTime", "place","participants","minutes"],["prjName"]],
						"cns" : ["dao.hb.PrjMinutes","dao.hb.PrjProject"],
						"hql" : "from dao.hb.PrjMinutes A,dao.hb.PrjProject B where A.prjId=B.prjId order by A.id desc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField"
		},
		propdef : {
			"A.id" : {
				display : '编号',
				cfg:{
					readOnly:true
				}
			},
			"A.prjId" : {
				display : '项目编号',				
				editor:"ComboBox",
		 		cfg:{
		 		   listWidth:200,
		 		   width:100,
			       store:getStore({hql:"select prjId,prjName from dao.hb.PrjProject  order by id"}),
			        displayField:'name',
			        valueField:'id',
			        typeAhead: true,
			        mode: 'local',
			        triggerAction: 'all',
			        emptyText:'...',
			        selectOnFocus:true
		        }
			},
			"A.theme" : {
				display : '主题'
			},
			"A.meetingsTime" : {
				display : '时间',
				editor:'DateField',
		           renderer:function(val){
					if(val!=null&&val.time){
						return renderDate(val);
					}else{
						return Ext.util.Format.date(val,"Y-m-d");
					}
				   }  
			},
			"A.place" : {
				display : '地点'
			},
			"A.participants" : {
				display : '人员'
			},
			"A.minutes" : {
				display : '纪要',
				editor:'ATField',
				cfg:{
					listeners:{ 
						fileselected:function(af,val){
						  var pos = val.lastIndexOf(".");
						  if(pos>0){
						  	var suf = val.substring(pos+1);
						    af.ui.editors['suffix'][0].setValue(suf);
						    af.item['suffix']=suf.toLowerCase();
						  }
						}
					}
				},
				renderer:function(itxt,r,col,l){
				 if(!itxt) return "";
				 if(itxt.indexOf('\\')!=-1){
				   var url=Bat.Host+"/upload"+itxt.replace(/\\/g,'/'); 
				   return "<a href=\""+url+"\" target=\"_blank\">"+itxt+"</a>";;
				 }
		       	 var pos1 = itxt.indexOf('[');
		       	 var pos2 = itxt.indexOf(']');
		       	 if(pos1==-1 || pos2==-1)
		       	   return "";
		       	 pos2 = itxt.lastIndexOf('~',pos2);
		       	 var sp = itxt.substring(pos1+1,pos2).replace(/~/g,'/');
		       	 var suffix = col.data.suffix;
		       	 var spec = col.data.spec;
		       	 if(spec&&spec.trim()!='')
		       	   sp=spec+'/'+sp;
		       	 if(suffix&&suffix.trim()!='')
		       	   sp=suffix+'/'+sp;
		       	 //var suffix=itxt.substr(itxt.length-4).toLowerCase();
		    	 var url=Bat.Host+"/upload/"+sp+"/"+itxt;
				 return "<a href=\""+url+"\" target=\"_blank\">"+itxt+"</a>";
				}
			},
			"B.prjName" : {
				display : '项目名称'
			}
		},
		grid : {
			//hide: ["A.prjId"],
			page : true,
			btns : ['打开','保存','增加','删除','检索', '排序','刷新']
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '详细信息',
				titlefunc : function(robj) {
					return '会议纪要详细[' + robj.items.map['A.id'] +']';
				}
			},
			tab : [
			    {
					title : "会议纪要详细信息",
					fset : [{
						legend : " ",
						props : ["A.id", "A.prjId","A.theme","A.meetingsTime", "A.place","A.participants","A.minutes"]
					}]
			    }
		    ]
		}
	},	
'dao.hb.PrjProject' : {
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["prjId", "prjName","startupTime","compTime", "actCompTime","descDivision", "descContent","status","type"]],
						"cns" : ["dao.hb.PrjProject"],
						"hql" : "from dao.hb.PrjProject order by prjId desc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField"
		},
		propdef : {
			prjId : {
				display : '编号',
				cfg:{
					readOnly:true
				}
			},
			prjName : {
				display : '名称'
			},
			startupTime : {
				display : '启动时间'	,
			 	   editor:'DateField',
		           renderer:function(val){
					if(val!=null&&val.time){
						return renderDate(val);
					}else{
						return Ext.util.Format.date(val,"Y-m-d");
					}
				   }      
			},
			compTime : {
				display : '预计完成时间',
			 	   editor:'DateField',
		           renderer:function(val){
					if(val!=null&&val.time){
						return renderDate(val);
					}else{
						return Ext.util.Format.date(val,"Y-m-d");
					}
			  }      
			},
			actCompTime : {
				display : '实际完成时间',
			 	   editor:'DateField',
		           renderer:function(val){
					if(val!=null&&val.time){
						return renderDate(val);
					}else{
						return Ext.util.Format.date(val,"Y-m-d");
					}
				   }      
			},
			descDivision : {
				display : '人员分工描述',
				editor:'TextArea'
			},
			descContent : {
				editor:'TextArea',
				display : '项目描述'
			},
			status : {
				renderer : function(val) {
					var dtxt = {
						0 : '禁用',
						1 : '未启动',
						2 : '进行中',
						3 : '已完成'
					};
					return dtxt[val];
				},
				display : '状态',
				editor : 'ComboBox',
				cfg : {
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['未启动', 1], ['进行中', 2],['已完成', 3],['禁用', 0]]
					}),
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true
				}
			},
			type : {
				display : '类型'
			}			
		},
		relviews:[
        {
	        titlefunc:function(robj){
	           return '项目<'+robj.items.map['prjId']+'>相关用户';
   	        },
	        v1:{vn:'dao.hb.CcSubper2',filterfunc:function(robj,ui){
	        	//var hql="from dao.hb.CcSubper A ,dao.hb.PrjProject B  where A.prjId=B.prjId and A.prjId='"
	  	         // +(robj.items.map['prjId']||0)+"' order by A.id";
				var hql="from dao.hb.CcSubper A ,dao.hb.AvensResource B  where A.username=B.username and A.prjId='"
	  	          +(robj.items.map['prjId']||0)+"' order by A.id";	  	          
	  	        //alert(hpl);
	            ui.req.map.psMap.map.hql = hql;
	        }},
	        //v2:{vn:'dao.hb.Relic'},
	        title: '相关用户'
        },
         {
        titlefunc:function(robj){
           return '项目<'+robj.items.map['prjId']+'>相关文稿';
        },
	  v1:{vn:'rel_rarity_doc',filterfunc:function(robj,ui){
			var cn = robj.cns[0];
			var bWF = (cn ==Bat.gvs.AVENSCN);
			var hql;
			if(bWF)
			 	hql = " from Rel A , Doc B where B.id=A.id2 and A.entity1='PRJ_PROJECT' and A.entity2='DOC' and A.id1="
					+ (robj.items.map['A.docid']) + " order by A.ord";
			else
			 	hql = " from Rel A , Doc B where B.id=A.id2 and A.entity1='PRJ_PROJECT' and A.entity2='DOC' and A.id1="
					+ (robj.items.map['prjId'] || 0) + " order by A.ord";
			ui.req.map.psMap.map.hql = hql;
			ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.Doc',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
        title: '相关文稿'
	  },
		{
			titlefunc : function(robj) {
				return '项目<' + robj.items.map['prjId'] + '>相关文物';
			},
			v1 : {
				vn : 'rel_doc_relic',
				filterfunc : function(robj, ui) {
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
					 	hql = " from Rel A , Relic B where B.objId=A.id2 and A.entity1='PRJ_PROJECT' and A.entity2='RELIC' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
					 	hql = " from Rel A , Relic B where B.objId=A.id2 and A.entity1='PRJ_PROJECT' and A.entity2='RELIC' and A.id1="
							+ (robj.items.map['prjId'] || 0)+ " order by A.ord";
					
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
				}
			},
			v2 : {
				vn : 'dao.hb.Relic',
				vfunc : function(vw) {
					var btns = ['检索', '排序', '刷新'];
					btns[btns.length] = vw.grid.btns[7];
					vw.grid.btns = btns;
					vw.req.map.psMap.map.rownum=5;
				}
			},
			title : '相关文物'
		},
		{
			titlefunc : function(robj) {
				return '项目<' + robj.items.map['A.prjId'] + '>相关影像';
			},
			v1 : {
				vn : 'rel_rarity_image',
				filterfunc : function(robj, ui) {
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
						hql = " from Rel A , Image B where B.imageId=A.id2 and A.entity1='PRJ_PROJECT' and A.entity2='IMAGE' and A.id1="
							+ (robj.items.map['A.docid']) +" order by A.ord";
					else
						hql = " from Rel A , Image B where B.imageId=A.id2 and A.entity1='PRJ_PROJECT' and A.entity2='IMAGE' and A.id1="
							+ (robj.items.map['prjId']||0) +" order by A.ord";						
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
				}
			},
			v2 : {
				vn : 'dao.hb.Image',
				vfunc : function(vw) {
					var btns = ['检索', '排序', '刷新'];
					btns[btns.length] = vw.grid.btns[4];
					vw.grid.btns = btns;
					vw.req.map.psMap.map.rownum=5;
				}
			},
			title : '相关影像'
		},
		{
	  titlefunc:function(robj){
	     return '关联>>相关人物';
   	  },
	  v1:{vn:'rel_doc_figure',filterfunc:function(robj,ui){
		var cn = robj.cns[0];
		var bWF = (cn ==Bat.gvs.AVENSCN);
		var hql;
		if(bWF)
		 	hql = " from Rel A , Figure B where B.id=A.id2 and A.entity1='PRJ_PROJECT' and A.entity2='FIGURE' and A.id1="
				+ (robj.items.map['A.docid'])+" order by A.ord";
		else
		 	hql = " from Rel A , Figure B where B.id=A.id2 and A.entity1='PRJ_PROJECT' and A.entity2='FIGURE' and A.id1="
				+ (robj.items.map['prjId'] || 0)+" order by A.ord";			
		ui.req.map.psMap.map.hql = hql;
		ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.Figure',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
	  title: '相关人物'
      },
      {
	  titlefunc:function(robj){
	     return '关联>>相关论文';
   	  },
	  v1:{vn:'rel_rarity_thesis',filterfunc:function(robj,ui){
		var cn = robj.cns[0];
		var bWF = (cn ==Bat.gvs.AVENSCN);
		var hql;
		if(bWF)
		 	hql = " from Rel A , Thesis B where B.thesisId=A.id2 and A.entity1='PRJ_PROJECT' and A.entity2='THESIS' and A.id1="
				+ (robj.items.map['A.docid']) + " order by A.ord";
		else
		 	hql = " from Rel A , Thesis B where B.thesisId=A.id2 and A.entity1='PRJ_PROJECT' and A.entity2='THESIS' and A.id1="
				+ (robj.items.map['prjId'] || 0) + " order by A.ord";
		ui.req.map.psMap.map.hql = hql;
		ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.Thesis',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
	  title: '相关论文'
      },
      {
	  titlefunc:function(robj){
	     return '关联>>相关音视频';
   	  },
	  v1:{vn:'rel_doc_audiovideo',filterfunc:function(robj,ui){
		var cn = robj.cns[0];
		var bWF = (cn ==Bat.gvs.AVENSCN);
		var hql;
		if(bWF)
		 	hql = " from Rel A , AudioVideo B where B.id=A.id2 and A.entity1='PRJ_PROJECT' and A.entity2='AUDIO_VIDEO' and A.id1="
				+ (robj.items.map['A.docid'])+" order by A.ord";
		else
		 	hql = " from Rel A , AudioVideo B where B.id=A.id2 and A.entity1='PRJ_PROJECT' and A.entity2='AUDIO_VIDEO' and A.id1="
				+ (robj.items.map['prjId'] || 0)+" order by A.ord";
		ui.req.map.psMap.map.hql = hql;
		ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.AudioVideo',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
	  title: '相关音视频'
      },
      {
		    titlefunc:function(robj){
			    return '项目<'+robj.items.map['A.prjId']+'>相关捐献';
		   	},
		    v1:{vn:'rel_figure_contribution',filterfunc:function(robj,ui){
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
					 	hql = " from Rel A , Contribution B where B.conId=A.id2 and A.entity1='PRJ_PROJECT' and A.entity2='CONTRIBUTION' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
					 	hql = " from Rel A , Contribution B where B.conId=A.id2 and A.entity1='PRJ_PROJECT' and A.entity2='CONTRIBUTION' and A.id1="
							+ (robj.items.map['prjId'] || 0) + " order by A.ord";							
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
			}},
			v2:{vn:'dao.hb.Contribution',
			    vfunc:function(vw){
        			var btns = ['检索','排序','刷新'];
        			btns[btns.length]=vw.grid.btns[7];
        			vw.grid.btns=btns;
		  			vw.req.map.psMap.map.rownum=5;
	        	}
	        },
            title: '相关捐献'
        },
        {
	  titlefunc:function(robj){
	     return '关联>>相关礼品';
   	  },
	  v1:{vn:'rel_doc_gift',filterfunc:function(robj,ui){
		var cn = robj.cns[0];
		var bWF = (cn ==Bat.gvs.AVENSCN);
		var hql;
		if(bWF)
		 	hql = " from Rel A , CeGift B where B.id=A.id2 and A.entity1='PRJ_PROJECT' and A.entity2='CE_GIFT' and A.id1="
				+ (robj.items.map['A.docid'])+" order by A.ord";
		else
		 	hql = " from Rel A , CeGift B where B.id=A.id2 and A.entity1='PRJ_PROJECT' and A.entity2='CE_GIFT' and A.id1="
				+ (robj.items.map['prjId'] || 0)+" order by A.ord";
		ui.req.map.psMap.map.hql = hql;
		ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.CeGift',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
	  title: '相关礼品'
      },
      {
			titlefunc : function(robj) {
				return '项目<' + robj.items.map['A.prjId'] + '>相关附件';
			},
			v1 : {
				vn : 'rel_subject_attach',
				filterfunc : function(robj, ui) {
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
						hql = " from Rel A , CeAttachment B where B.id=A.id2 and A.entity1='PRJ_PROJECT' and A.entity2='CE_ATTACHMENT' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
						hql = " from Rel A , CeAttachment B where B.id=A.id2 and A.entity1='PRJ_PROJECT' and A.entity2='CE_ATTACHMENT' and A.id1="
							+ (robj.items.map['prjId']||0) + " order by A.ord";
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
				}
			},
			v2 : {
				vn : 'dao.hb.CeAttachment',
				vfunc : function(vw) {
					var btns = ['检索', '排序', '刷新'];
					btns[btns.length] = vw.grid.btns[7];
					vw.grid.btns = btns;
					vw.req.map.psMap.map.rownum=5;
				}
			},
			title : '相关附件'
		}
        ],
		grid : {
			hide: ['question','answer'],
			page : true,
			btns : ['打开','保存','增加','删除','检索', '排序','刷新',{
	   		text: '项目进度',
	   		iconCls: 'plugin_add',
			handler : function(btn){
			  var ui=btn.ui;
			  var sels=ui.grid.getSelections();
			  if(!sels || sels.length==0) return;
			  var selid=0;
			  selid = sels[0].obj.items.map['prjId'];	
			  var hql="";
		 	  var pm={'method':'O','hql':hql,'selid':selid};
		      var req={"map":{"psMap":{map:pm,"javaClass":"java.util.HashMap"},"SN":"DpmHandle"},"javaClass":"java.util.HashMap"};
		    	jsonrpc.BH.handle(function(rd){
			       //var aa =rd;
			       //f.taskTotal=parseInt(rd[0][1]);
			       //req.map.psMap.map.tid=f.taskId;
			       //req.map.psMap.map.method='H';
			    	//jsonrpc.BH.handle(function(rd){
			    	//},[req]);  
		    		//alert("完成   "+rd);
		    		CC.showPrjPro(btn,selid,rd);
					ui.load();
			   	},[req]); 					
		    }
		 }
		 ]
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '详细信息',
				titlefunc : function(robj) {
					return '项目详细[' + robj.items.map['prjId'] +']';
				}
			},
			tab : [{
					title : "基本信息",
					fset : [{
						legend : " ",
						props : ["prjId", "prjName","startupTime","compTime", "actCompTime", "status","type"]
					}]
			    	},{
					title : "项目分工",
					fset : [{
						legend : " ",
						props : ["descDivision"]
					}]					
					},{
					title : "项目描述",
					fset : [{
						legend : " ",
						props : ["descContent"]
					}]
			    }
		    ]
		}
	},	
		
	'dao.hb.Doc' : {
    	//handles:{general:{'before_put':function(ui){
    		//for(var i=0,len=ui.objs.length;i<len;i++){
    			//var obj = ui.objs[i];
    			//if(obj.action=='U'){
    				//var txt  = obj.items.map['A.description']||'';
    				//obj.items.map['A.objNumber']=txt.length;
    				//txt  = obj.items.map['B.description']||'';
    				//obj.items.map['B.objNumber']=txt.length;
    			//}
    		//}
    	//}
    	//}},
		req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [
								["id", "type","subtype", "author", "linkMan","ord",  "title",
										"objNumber", "note", "keywords",
										"description",
										"objNo","type3","generateDate","generateEra","objAuthor","buildingarea","dateDisplay","tag","forward","platecatalog","protagonist","lastUpdate"],
								["id", "type","subtype", "author", "linkMan",  "title",
										"objNumber", "note", "keywords",
										"description",
										"objNo","type3","generateDate","generateEra","objAuthor","buildingarea","dateDisplay","tag","forward","platecatalog","protagonist","lastUpdate"]],
						"cns" : ["dao.hb.Doc", "dao.hb.DocUk"],
						"hql" : "from dao.hb.Doc A , dao.hb.DocUk B Where A.id=B.id and A.id<"
							+ KX_KV_START+" order by A.id desc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField"
		},
		propdef : {
			"A.ord":{
		       display:"是否置顶",
		   	    editor:'ComboBox',
		   	    renderer:function(val){
		   			var dtxt ={'1':'是','0':'否'};
		   			return dtxt[val];	
		   	    },
		        cfg:{
		       	store:new Ext.data.SimpleStore({
			        fields: ['txt', 'val'],
			        data : [['是','1'],['否','0']] 
		        }),
		        displayField:'txt',
		        valueField:'val',
		        typeAhead: true,
		        mode: 'local',
		        triggerAction: 'all',
		        emptyText:'...',
		        selectOnFocus:true
		        }	       				
			},
			"A.forward":{
				display : '前言附注'
			},
			"A.platecatalog":{
				display : '图版目录'
			},
			"A.tag":{
				display : '标识'
			},
			"A.dateDisplay":{
				display : '显示日期'
			},
			"A.buildingarea":{
				display : '古建区域'
			},
			"A.objAuthor":{
				display : '作者'
			},
			"A.generateEra":{
				display : '年代'
			},
			"A.generateDate":{
				display : '日期',
				renderer : function(val) {
					return renderDate(val);
				},
				cfg:{
					readOnly:true
				}
			},
			"A.type3":{
				display : '三级分类'
			},
			"A.objNo":{
				display : '对象编号'
			},
			"A.id" : {
				display : '编号',
				cfg:{
					readOnly:true
				}
			},
		 	"A.subtype":{
		 		display:'细分类',
		 		editor :'TreeField',
	              cfg:{
	              	text:'.....',
	            	 fieldLabel:'树形下拉',
	            	 listHeight:250,
	            	 listWidth:250,
	            	 //valueField:'text',
	            	checkModel:'multiple',
	            	selectValueModel:'all',
	            	returnData:'includeParent',
		   		    dataUrl:'/cc/servlet/JSonBaseServlet?',
		   		    baseParams:{mode:'TREE',hql:' ',tablename:'dao.hb.BaseDoctype',fieldnames:'id,name,parentid',filter:""}
	   		    	//listeners:{ 
		         	 //select:function(tree, node){
		         	 	//var ptext=node.parentNode.attributes.text;
		         	 	//if (tree.ed)
		         	 	  //tree.ed.record.set('A.type',ptext);
		         	 	//else if (tree.ui){
		         	 	  //var editors=tree.ui.editors;
		         	 	  //editors['A.type'][0].setValue(ptext);
		         	 	//}
		         	 //}
			         //}
		   	      }
		 	},		 	
		 	//TODO 从文稿分类表获得联动数据
			"A.type" : {
				display : '类型(以后要做废)',
		 		editor:"ComboBox",
		 		cfg:{
		 		   listWidth:100,
		 		   width:100,
			       store:getStore({hql:"select id,name from dao.hb.BaseDoctype where parentid is null order by name"}),
			        displayField:'name',
			        valueField:'name',
			        typeAhead: true,
			        mode: 'local',
			        triggerAction: 'all',
			        emptyText:'...',
			        selectOnFocus:true
		        }
			},
			"A.author" : {
				display : '撰稿人',
	              editor :'TreeField',
	              cfg:{
	              	text:'.....',
	            	 fieldLabel:'树形下拉',
	            	 listHeight:250,
	            	 listWidth:250,
	            	 //valueField:'id',
	            	 //checkModel:'multiple',
	            	 //selectValueModel:'leaf',
		   		    dataUrl:'/cc/servlet/JSonBaseServlet?',
		   		    baseParams:{mode:'TREEAWAI',hql:'',tablename:'',fieldnames:'id,name,parentid',filter:" order by name"}
		   	      }				
			},
			"A.linkMan" : {
				display : '约稿人',
		 		//editor:"TreeField",
		 		// cfg:{
	              	//text:'.....',
	            	// fieldLabel:'树形下拉',
	            	// listHeight:250,
	            	// listWidth:250,
	            	 ////valueField:'id',
		   		    //dataUrl:'/cc/servlet/JSonBaseServlet?',
		   		   // baseParams:{mode:'TREEPERSION',hql:'',tablename:'',fieldnames:'id,name,parentid',filter:" where userdn like '%ou=zhanshineirongcaibianke%' order by name",filter2:" where orgid like '%ou=zhanshineirongcaibianke%' "}
		   	     // }	
		   	      
		   	    editor:"ComboBox",
		 		cfg:{
		 		   listWidth:100,
		 		   width:100,
			       store:getStore({hql:"select id,name from dao.hb.AvensResource where userdn like '%ou=zhanshineirongcaibianke%' order by name "}),
			        displayField:'name',
			        valueField:'name',
			        typeAhead: true,
			        mode: 'local',
			        triggerAction: 'all',
			        emptyText:'...',
			        selectOnFocus:true
		        }	
		   	      
			},
			"A.title" : {
				display : '题名'
			},
			"A.objNumber" : {
				display : '正文字数',
				cfg:{
					readOnly:true
				}
			},
			"A.note" : {
				display : '备注'
			},
			"A.keywords" : {
				display : '关键词'
			},
			"A.description" : {
				display : "正文内容",
				//editor:'TextArea',				
				editor : "HtmlEditor",
				hide:true,
				cfg : {
					hideLabel:true,
					//id:1311,
					width : 650,
					height : 200,
					plugins: new Ext.ux.plugins.HtmlEditorImageInsert({
                    popTitle: '插入影像',
                    popMsg: '请输入影像编号...',
                    popWidth: 400
                    //,popValue: 'http://www.google.gr/intl/en_com/images/logo_plain.png'
                })				
                }
				
			},
			"A.protagonist" : {
				display : '主角'
			},

			"B.forward":{
				display : '前言附注(英文)'
			},
			"B.platecatalog":{
				display : '图版目录(英文)'
			},			
			"B.tag":{
				display : '标识(英文)'
			},
			"B.dateDisplay":{
				display : '显示日期(英文)'
			},
			"B.buildingarea":{
				display : '古建区域(英文)'
			},
			"B.objAuthor":{
				display : '作者(英文)'
			},
			"B.generateEra":{
				display : '年代(英文)'
			},
			"B.generateDate":{
				display : '日期(英文)',
				renderer : function(val) {
					return renderDate(val);
				},
				cfg:{
					readOnly:true
				}
			},
			"B.type3":{
				display : '三级分类(英文)'
			},
			"B.objNo":{
				display : '对象编号(英文)'
			},
			"B.id" : {
				display : '编号(英文)',
				cfg:{
					readOnly:true
				}
			},
			"B.type" : {
				display : '类型(英文)'
			},
			"B.subtype" : {
				display : '细分类(英文)'
			},
			"B.author" : {
				display : '撰稿人(英文)'
			},
			"B.linkMan" : {
				display : '约稿人(英文)'
			},
			"B.title" : {
				display : '题名(英文)'
			},
			"B.objNumber" : {
				display : '正文字数(英文)',
				cfg:{
					readOnly:true
				}
			},
			"B.note" : {
				display : '备注(英文)'
			},
			"B.keywords" : {
				display : '关键词(英文)'
			},
			"B.description" : {
				display : "正文内容(英文)",
				editor : "HtmlEditor",
				cfg : {
					hideLabel:true,
					width : 650,
					height : 200,
					plugins: new Ext.ux.plugins.HtmlEditorImageInsert({
	                    popTitle: '插入影像',
	                    popMsg: '请输入影像编号...',
	                    popWidth: 400
	                    //,popValue: 'http://www.google.gr/intl/en_com/images/logo_plain.png'
                	}
                	)
				}
			},
			"B.protagonist" : {
				display : '主角(英文)'
			}			
		},
		relviews : [{
			titlefunc : function(robj) {
				return '文稿<' + robj.items.map['A.id'] + '>打标结果';
			},
			v1 : {
				vn : 'dao.hb.RpMarkingResult_obj',
				filterfunc : function(robj, ui) {
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
			  	        hql="from dao.hb.RpMarkingResult where objkey1='DOC#DESCRIPTION#"
			  	        +(robj.items.map['A.docid'])+"'";
			  	    else
			  	        hql="from dao.hb.RpMarkingResult  where objkey1='DOC#DESCRIPTION#"
			  	        +(robj.items.map['A.id']||0)+"'";
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
				}
			},
			v2:{vn:''},
			title : '打标结果'
		}, {
			titlefunc : function(robj) {
				return '文稿<' + robj.items.map['A.id'] + '>相关文物';
			},
			v1 : {
				vn : 'rel_doc_relic',
				filterfunc : function(robj, ui) {
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
					 	hql = " from Rel A , Relic B where B.objId=A.id2 and A.entity1='DOC' and A.entity2='RELIC' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
					 	hql = " from Rel A , Relic B where B.objId=A.id2 and A.entity1='DOC' and A.entity2='RELIC' and A.id1="
							+ (robj.items.map['A.id'] || 0)+ " order by A.ord";
					
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
				}
			},
			v2 : {
				vn : 'dao.hb.Relic',
				vfunc : function(vw) {
					var btns = ['检索', '排序', '刷新'];
					btns[btns.length] = vw.grid.btns[7];
					vw.grid.btns = btns;
					vw.req.map.psMap.map.rownum=5;
				}
			},
			title : '相关文物'
		},{
	  titlefunc:function(robj){
	     return '关联>>相关论文';
   	  },
	  v1:{vn:'rel_rarity_thesis',filterfunc:function(robj,ui){
		var cn = robj.cns[0];
		var bWF = (cn ==Bat.gvs.AVENSCN);
		var hql;
		if(bWF)
		 	hql = " from Rel A , Thesis B where B.thesisId=A.id2 and A.entity1='DOC' and A.entity2='THESIS' and A.id1="
				+ (robj.items.map['A.docid']) + " order by A.ord";
		else
		 	hql = " from Rel A , Thesis B where B.thesisId=A.id2 and A.entity1='DOC' and A.entity2='THESIS' and A.id1="
				+ (robj.items.map['A.id'] || 0) + " order by A.ord";
		ui.req.map.psMap.map.hql = hql;
		ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.Thesis',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
	  title: '相关论文'
      }, {
			titlefunc : function(robj) {
				return '文稿<' + robj.items.map['A.id'] + '>相关建筑';
			},
			v1 : {
				vn : 'rel_doc_building',
				filterfunc : function(robj, ui) {
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
					 	hql = " from Rel A , Building B where B.objId=A.id2 and A.entity1='DOC' and A.entity2='BUILDING' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
					 	hql = " from Rel A , Building B where B.objId=A.id2 and A.entity1='DOC' and A.entity2='BUILDING' and A.id1="
							+ (robj.items.map['A.id'] || 0) + " order by A.ord";
					
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
				}
			},
			v2 : {
				vn : 'dao.hb.Building',
				vfunc : function(vw) {
					var btns = ['检索', '排序', '刷新'];
					btns[btns.length] = vw.grid.btns[7];
					vw.grid.btns = btns;
					vw.req.map.psMap.map.rownum=5;
				}
			},
			title : '相关建筑'
		}, {
			titlefunc : function(robj) {
				return '文稿<' + robj.items.map['A.id'] + '>相关影像';
			},
			v1 : {
				vn : 'rel_rarity_image',
				filterfunc : function(robj, ui) {
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
						hql = " from Rel A , Image B where B.imageId=A.id2 and A.entity1='DOC' and A.entity2='IMAGE' and A.id1="
							+ (robj.items.map['A.docid']) +" order by A.ord";
					else
						hql = " from Rel A , Image B where B.imageId=A.id2 and A.entity1='DOC' and A.entity2='IMAGE' and A.id1="
							+ (robj.items.map['A.id']||0) +" order by A.ord";
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
				}
			},
			v2 : {
				vn : 'dao.hb.Image',
				vfunc : function(vw) {
					var btns = ['检索', '排序', '刷新'];
					btns[btns.length] = vw.grid.btns[4];
					vw.grid.btns = btns;
					vw.req.map.psMap.map.rownum=5;
				}
			},
			title : '相关影像'
		}, {
			titlefunc : function(robj) {
				return '文稿<' + robj.items.map['A.id'] + '>相关专题';
			},
			v1 : {
				vn : 'rel_doc_subject',
				filterfunc : function(robj, ui) {
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
						hql = " from Rel A , Subject B where B.id=A.id2 and A.entity1='DOC' and A.entity2='SUBJECT' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
						hql = " from Rel A , Subject B where B.id=A.id2 and A.entity1='DOC' and A.entity2='SUBJECT' and A.id1="
							+ (robj.items.map['A.id']||0) + " order by A.ord";
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
				}
			},
			v2 : {
				vn : 'dao.hb.Subject',
				vfunc : function(vw) {
					var btns = ['检索', '排序', '刷新'];
					btns[btns.length] = vw.grid.btns[7];
					vw.grid.btns = btns;
					vw.req.map.psMap.map.rownum=5;
				}
			},
			title : '相关专题'
		},{
	  titlefunc:function(robj){
	     return '关联>>相关文稿';
   	  },
	  v1:{vn:'rel_rarity_doc',filterfunc:function(robj,ui){
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
					 	hql = " from Rel A , Doc B where B.id=A.id2 and A.entity1='DOC' and A.entity2='DOC' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
					 	hql = " from Rel A , Doc B where B.id=A.id2 and A.entity1='DOC' and A.entity2='DOC' and A.id1="
							+ (robj.items.map['A.id'] || 0) + " order by A.ord";
	   				ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.Doc',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
	  title: '相关文稿'
      },{
	  titlefunc:function(robj){
	     return '关联>>相关人物';
   	  },
	  v1:{vn:'rel_doc_figure',filterfunc:function(robj,ui){
		var cn = robj.cns[0];
		var bWF = (cn ==Bat.gvs.AVENSCN);
		var hql;
		if(bWF)
		 	hql = " from Rel A , Figure B where B.id=A.id2 and A.entity1='DOC' and A.entity2='FIGURE' and A.id1="
				+ (robj.items.map['A.docid'])+" order by A.ord";
		else
		 	hql = " from Rel A , Figure B where B.id=A.id2 and A.entity1='DOC' and A.entity2='FIGURE' and A.id1="
				+ (robj.items.map['A.id'] || 0)+" order by A.ord";
		ui.req.map.psMap.map.hql = hql;
		ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.Figure',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
	  title: '相关人物'
      },{
	  titlefunc:function(robj){
	     return '关联>>相关音视频';
   	  },
	  v1:{vn:'rel_doc_audiovideo',filterfunc:function(robj,ui){
		var cn = robj.cns[0];
		var bWF = (cn ==Bat.gvs.AVENSCN);
		var hql;
		if(bWF)
		 	hql = " from Rel A , AudioVideo B where B.id=A.id2 and A.entity1='DOC' and A.entity2='AUDIO_VIDEO' and A.id1="
				+ (robj.items.map['A.docid'])+" order by A.ord";
		else
		 	hql = " from Rel A , AudioVideo B where B.id=A.id2 and A.entity1='DOC' and A.entity2='AUDIO_VIDEO' and A.id1="
				+ (robj.items.map['A.id'] || 0)+" order by A.ord";
		ui.req.map.psMap.map.hql = hql;
		ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.AudioVideo',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
	  title: '相关音视频'
      },{
	  titlefunc:function(robj){
	     return '关联>>相关礼品';
   	  },
	  v1:{vn:'rel_doc_gift',filterfunc:function(robj,ui){
		var cn = robj.cns[0];
		var bWF = (cn ==Bat.gvs.AVENSCN);
		var hql;
		if(bWF)
		 	hql = " from Rel A , CeGift B where B.id=A.id2 and A.entity1='DOC' and A.entity2='CE_GIFT' and A.id1="
				+ (robj.items.map['A.docid'])+" order by A.ord";
		else
		 	hql = " from Rel A , CeGift B where B.id=A.id2 and A.entity1='DOC' and A.entity2='CE_GIFT' and A.id1="
				+ (robj.items.map['A.id'] || 0)+" order by A.ord";
		ui.req.map.psMap.map.hql = hql;
		ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.CeGift',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
	  title: '相关礼品'
      }, {
			titlefunc : function(robj) {
				return '文稿<' + robj.items.map['A.id'] + '>相关附件';
			},
			v1 : {
				vn : 'rel_subject_attach',
				filterfunc : function(robj, ui) {
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
						hql = " from Rel A , CeAttachment B where B.id=A.id2 and A.entity1='DOC' and A.entity2='CE_ATTACHMENT' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
						hql = " from Rel A , CeAttachment B where B.id=A.id2 and A.entity1='DOC' and A.entity2='CE_ATTACHMENT' and A.id1="
							+ (robj.items.map['A.id']||0) + " order by A.ord";
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
				}
			},
			v2 : {
				vn : 'dao.hb.CeAttachment',
				vfunc : function(vw) {
					var btns = ['检索', '排序', '刷新'];
					btns[btns.length] = vw.grid.btns[7];
					vw.grid.btns = btns;
					vw.req.map.psMap.map.rownum=5;
				}
			},
			title : '相关附件'
		}],
		grid : {
			hide : ["A.forward","A.platecatalog","A.tag","A.dateDisplay","A.buildingarea","A.objAuthor","A.generateEra","A.generateDate","A.type3","A.objNo","A.subtype","A.linkMan","A.objNumber","A.note","A.keywords", "A.description","A.protagonist","B.forward","B.platecatalog","B.tag","B.dateDisplay","B.buildingarea","B.objAuthor","B.generateEra","B.generateDate","B.type3","B.objNo","B.id","B.type","B.subtype","B.author","B.linkMan","B.title","B.objNumber","B.note" ,"B.keywords" ,"B.description","B.protagonist" ,'A.lastUpdate','B.lastUpdate'],
			page : true,
			hidebtns_objview:[1,2,3,7],
			hidebtns_objmode:[7],
			btns : ['打开','增加', '删除', '保存', '检索', '排序', '刷新',{
	   		text: '关联文稿',
	   		iconCls: 'plugin_add',
			handler : function(btn){
		    	buildRel(btn,'DOC','A.id',['A.title']);
		    }}]
		},
		edit : {
			dlg : {
				width : 600,
				height : 360,
				title : '文稿详细信息',
				titlefunc : function(robj) {
					return '详细>>文稿[' + robj.items.map['A.id'] + ']';
				}
			},
			tab : [{
				title : "文稿详细信息",
				fset : [{
					legend : " ",
					props : ["A.id", "A.type","A.subtype", "A.author", "A.linkMan",
							"A.title", "A.note", "A.keywords","A.ord"]
				},{
					legend : " ",
					props : ["A.objNo","A.type3","A.generateDate","A.generateEra","A.objAuthor","A.buildingarea","A.dateDisplay","A.tag","A.forward","A.platecatalog","A.protagonist"]
				}]
			},{
				title : "正文内容",
				fset : [{
					legend : " ",
					props : ["A.description"]
				}]
			}, {
				title : "文稿详细信息(英文)",
				fset : [{
					legend : " ",
					props : ["B.id", "B.type","B.subtype", "B.author", "B.linkMan",
							"B.title",  "B.note", "B.keywords"]
				},{
					legend : " ",
					props : ["B.objNo","B.type3","B.generateDate","B.generateEra","B.objAuthor","B.buildingarea","B.dateDisplay","B.tag","B.forward","B.platecatalog","B.protagonist"]
				}]
			},{
				title : "正文内容(英文)",
				fset : [{
					legend : " ",
					props : ["B.description"]
				}]
			}]
		}
	},
	'dao.hb.Lemma' : {
		req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "lemmaName","isdel", "descriptionAuthor",
								"lemmaNum", "description", "language", "oper",
								"createdTime", "lastupdatedTime", "transFlag",
								"outputFlag", "publishF", "publishTime","lastUpdate"]],
						"cns" : ["dao.hb.Lemma"],
						"hql" : "from dao.hb.Lemma order by id desc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField"
		},
		propdef : {
			id : {
				display : '编号',
				cfg:{
					readOnly:true
				}
			},
			lemmaName : {
				display : '词条名称'
			},
		 	isdel:{
		 		display:'是否删除(Y/N)'
		 	},			
			descriptionAuthor : {
				display : '词条撰稿人'
			},
			lemmaNum : {
				display : '词条字数'
			},
			description : {
				display : '词条内容',
				editor : "HtmlEditor",
				cfg : {
					width : 600,
					hideLabel:true,
					height : 200
				}
			},
			language : {
				display : '词条的语种'
			},
			oper : {
				display : '操作员'
			},
			createdTime : {
				display : '词条创建时间',
				renderer : function(val) {
					return renderDate(val);
				},
				cfg:{
					readOnly:true
				}
			},
			lastupdatedTime : {
				display : "最后修改时间",
				renderer : function(val) {
					return renderDate(val);
				},
				cfg:{
					readOnly:true
				}
			},
			transFlag : {
				display : "翻译稿标志位",
				renderer : function(val) {
					var dtxt = {
						'Y' : '翻译稿',
						'N' : '未翻译稿'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['翻译稿', 'Y'], ['未翻译稿', 'N']]
					}),
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true
				}
			},
			outputFlag : {
				display : "导出标记",
				renderer : function(val) {
					var dtxt = {
						'Y' : '导出过',
						'N' : '未导出过'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['导出过', 'Y'], ['未导出过', 'N']]
					}),
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true
				}
			},
			publishF : {
				display : "完成标志",
				renderer : function(val) {
					var dtxt = {
						'Y' : '完成',
						'N' : '未完成'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['完成', 'Y'], ['未完成', 'N']]
					}),
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true
				}
			},
			publishTime : {
				display : "完成时间",
				renderer : function(val) {
					return renderDate(val);
				}
			}
		},
		grid : {
			hide:['description','lastUpdate','outputFlag','publishF','publishTime','lastupdatedTime','createdTime'],
			page : true,
			hidebtns_objmode:[],
			hidebtns_objview:[1,2,3],
			btns : ['打开','增加', '删除', '保存', '关联关系', '检索', '排序', '刷新',{
	   		text: '更新打标词条',
	   		iconCls: 'sta',
			handler : function(btn){
				updateMarkingL(btn);
		    }}]
		},
		edit : {
			dlg : {
				width : 600,
				height : 360,
				title : '词条详细信息',
				titlefunc : function(robj) {
					return '详细>>词条名称[' + robj.items.map['lemmaName'] + ']';
				}
			},
			tab : [{
				title : "词条详细信息",
				fset : [{
					legend : " ",
					props : ["id", "lemmaName", "descriptionAuthor",
							"isdel","lemmaNum", "language", "oper"]
				},{
					legend : " ",
					//props : ["createdTime", "lastupdatedTime", "transFlag",
					//		"outputFlag", "publishF", "publishTime"]
					props : ["transFlag"]
				}]
			}, {
				title : "正文内容",
				fset : [{
					legend : " ",
					props : ["description"]
				}]
			}]
		}
	},
'dao.hb.Relic':{
    	handles:{general:{'before_put':function(ui){
    		for(var i=0,len=ui.objs.length;i<len;i++){
    			var obj = ui.objs[i];
    			if(obj.action=='U'){
    				var txt  = obj.items.map['A.objNo']||'';
    				if (txt && txt.indexOf(',')<0){    //wjh 2010.10.13
	    				var vtxt =reset_rnum(txt);
	    				obj.items.map['A.objNo']=vtxt;
	    				if (vtxt!=txt)
	    				  alert('文物号['+txt+']规范为['+vtxt+']');	
    				}    				
    			}
    		}
    	}
    	}},
	 req:{"map":{"psMap":{"map":{"rownum":20,"pss":[["objId","author","classa","objNo","objName","grade","generateEra","eraBegin","eraEnd","description","objNumber","note","keywords","docAuthor","era","showLocation","showFrom","showTo","material","colorMode","objsize","lastUpdate"],
	 ["objId","author","classa","objNo","objName","generateEra","eraBegin","eraEnd","description","objNumber","note","keywords","docAuthor","era","showLocation","showFrom","showTo","material","colorMode","objsize","lastUpdate"]],"cns":["dao.hb.Relic","dao.hb.RelicUk"],"hql":"from dao.hb.Relic A, dao.hb.RelicUk B where A.objId=B.objId order by A.objId desc","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
   	 editor:"TextField"
   },
   propdef:{
   	   /*uk*/
   	    'A.objId':{
	 		display:'文物id',
			cfg:{
				readOnly:true
			}
	 	},
	 	'A.author':{
	 		display:'作者(窑口)'
	 	},
	 	'A.classa':{
	 		display:'分类',
		 		editor :'TreeField',
	              cfg:{
	              	 width:350,
	              	 text:'.....',
	            	 fieldLabel:'树形下拉',
	            	 listHeight:250,
	            	 listWidth:250,
	            	 checkModel:'multiple',
	            	 selectValueModel:'all',
	            	 returnData:'includeParent',
	            	 valueField:'text',
		   		    dataUrl:'/cc/servlet/JSonBaseServlet?',
		   		    baseParams:{mode:'TREE',hql:' ',tablename:'dao.hb.BaseRelicclass',fieldnames:'id,name,parentid',filter:" order by parentid, ord"}
		   	      }	 		
	 	},		 	
	 	/*
	 	'A.className':{
	 		display:'分类',
	 		editor:"ComboBox",
		 		cfg:{
		 		   listWidth:100,
		 		   width:100,
			       store:getStore({hql:"select id,name from dao.hb.BaseRelicclass"}),
			        displayField:'name',
			        valueField:'name',
			        typeAhead: true,
			        mode: 'local',
			        triggerAction: 'all',
			        emptyText:'...',
			        selectOnFocus:true
		        }		 		
	 	},	 
	 	'A.objProdarea':{
	 		display:'细分类',
		 		editor :'TreeField',
	              cfg:{
	              	text:'.....',
	            	 fieldLabel:'树形下拉',
	            	 listHeight:250,
	            	 listWidth:250,
	            	 //valueField:'text',
		   		    dataUrl:'/cc/servlet/JSonBaseServlet?',
		   		    baseParams:{mode:'TREE',hql:' ',tablename:'dao.hb.BaseRelicclass',fieldnames:'id,name,parentid',filter:""},
	   		    	listeners:{ 
		         	 select:function(tree, node){
		         	 	var ptext=node.parentNode.attributes.text;
		         	 	if (tree.ed)
		         	 	  tree.ed.record.set('A.className',ptext);
		         	 	else if (tree.ui){
		         	 	  var editors=tree.ui.editors;
		         	 	  editors['A.className'][0].setValue(ptext);
		         	 	}
		         	 }
			         }
		   	      }	 		
	 	},	
	 	'A.classiii':{
	 		display:'三级分类'
	 	},
	 	*/
	 	'A.objNo':{
	 		display:'文物编号'
	 	},
	 	'A.objName':{
	 		display:'文物名称'
	 	},
	 	'A.grade':{
	 		display:'级别'
	 	},	 	
	 	'A.generateEra':{
	 		display:'文物年代',
	 		editor :'TreeField',
	              cfg:{
	              	 width:350,
	              	 text:'.....',
	            	 fieldLabel:'树形下拉',
	            	 listHeight:250,
	            	 listWidth:250,
	            	 //checkModel:'multiple',
	            	 //selectValueModel:'all',
	            	 //returnData:'includeParent',
	            	 valueField:'text',
		   		    dataUrl:'/cc/servlet/JSonBaseServlet?',
		   		    baseParams:{mode:'TREE',hql:' ',tablename:'dao.hb.BaseEra',fieldnames:'id,name,parentid',filter:" order by parentid, ord"}
		   	      }	
	 	},
	 	'A.eraBegin':{
	       display:"起始年代"
	   	},
	   	'A.eraEnd':{
	       display:"终止年代"
	   	},   	
	   	'A.description':{
	       display:"正文内容",
	       editor:"HtmlEditor",
		   cfg : {
		       hideLabel:true,
			   width : 600,
		       height : 200
		    }
	   	},
	   	'A.objNumber':{
	       display:"正文字数"
	   	},
	   	'A.note':{
	       display:"备注"	       
	   	},
	   	'A.keywords':{
	       display:"关键词"
	   	},
	   	'A.docAuthor':{
	       display:"撰稿人"
	   	},
	   	'A.era':{
	       display:"公元纪年"
	   	},
	   	'A.showLocation':{
	       display:"展出地点"
	   	},
	   	'A.showFrom':{
	       display:"展出起始时间",
	      renderer:function(val){
		      return renderDate(val);
		  }
	   	},
	   	'A.showTo':{
	       display:"展出截止时间",
	      renderer:function(val){
		      return renderDate(val);
		  }
	   	},
	   	'A.material':{
	       display:"材质"
	   	},
	   	'A.colorMode':{
	       display:"用色方式"
	   	},
	   	'A.objsize':{
	       display:"尺寸"
	   	},
	   	/*uk*/
   	    'B.objId':{
	 		display:'文物id(英文)',
			cfg:{
				readOnly:true
			}
	 	},
	 	'B.author':{
	 		display:'撰稿人(英文)'
	 	},
	 	'B.classa':{
	 		display:'分类(英文)'
	 	},
	 	/*
	 	'B.className':{
	 		display:'分类'
	 	},	 
	 	'B.objProdarea':{
	 		display:'细分类'
	 	},
	 	*/		 	
	 	'B.objNo':{
	 		display:'文物编号(英文)'
	 	},
	 	'B.objName':{
	 		display:'文物名称(英文)'
	 	},
	 	'B.generateEra':{
	 		display:'文物年代(英文)'
	 	},
	 	'B.eraBegin':{
	       display:"起始年代(英文)"
	   	},
	 	'B.eraEnd':{
	       display:"终止年代(英文)"
	   	},	   	
	   	'B.description':{
	       display:"正文内容(英文)",
	       editor:"HtmlEditor",
	       cfg:{	   		  
	   		  width:600,
	   		  hideLabel:true,
	   		  height:200
	   	   }
	   	},
	   	'B.objNumber':{
	       display:"正文字数(英文)"
	   	},
	   	'B.note':{
	       display:"备注(英文)"	       
	   	},
	   	'B.keywords':{
	       display:"关键词(英文)"
	   	},
	   	'B.docAuthor':{
	       display:"作者(英文)"
	   	},
	   	'B.era':{
	       display:"公元纪年(英文)"
	   	},
	   	'B.showLocation':{
	       display:"展出地点(英文)"
	   	},
	   	'B.showFrom':{
	       display:"展出起始时间(英文)",
	      renderer:function(val){
		      return renderDate(val);
		  }
	   	},
	   	'B.showTo':{
	       display:"展出截止时间(英文)",
	      renderer:function(val){
		      return renderDate(val);
		  }
	   	},
	   	'B.material':{
	       display:"材质(英文)"
	   	},
	   	'B.colorMode':{
	       display:"用色方式(英文)"
	   	},
	   	'B.objsize':{
	       display:"尺寸(英文)"
	   	}
   },
   relviews:[{
		        titlefunc:function(robj){
		           return '文物<'+robj.items.map['objId']+'>打标结果';
	   	        },
		        v1:{vn:'dao.hb.RpMarkingResult_obj',filterfunc:function(robj,ui){
		            					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
					 	hql = "from dao.hb.RpMarkingResult  where objkey1='RELIC#DESCRIPTION#"
							+ (robj.items.map['A.docid'])+"'";							
					else
						hql = "from dao.hb.RpMarkingResult  where objkey1='RELIC#DESCRIPTION#"
							+ (robj.items.map['A.objId'] || 0)+"'";
		            ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
		        }},
		        v2:{vn:''},
		        title: '打标结果'
	  },{
	  titlefunc:function(robj){
	     return '关联>>相关影像';
   	  },
	  v1:{vn:'rel_rarity_image',filterfunc:function(robj,ui){
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
					 	hql = " from Rel A , Image B where B.imageId=A.id2 and A.entity1='RELIC' and A.entity2='IMAGE' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
					 	hql = " from Rel A , Image B where B.imageId=A.id2 and A.entity1='RELIC' and A.entity2='IMAGE' and A.id1="
							+ (robj.items.map['A.objId'] || 0)+" order by A.ord";
	   				ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.Image',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[4];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
	  title: '相关影像'
      },{
	  titlefunc:function(robj){
	     return '关联>>相关论文';
   	  },
	  v1:{vn:'rel_rarity_thesis',filterfunc:function(robj,ui){
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
					 	hql = " from Rel A , Thesis B where B.thesisId=A.id2 and A.entity1='RELIC' and A.entity2='THESIS' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
					 	hql = " from Rel A , Thesis B where B.thesisId=A.id2 and A.entity1='RELIC' and A.entity2='THESIS' and A.id1="
							+ (robj.items.map['A.objId'] || 0) + " order by A.ord";
	   				ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.Thesis',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
	  title: '相关论文'
      },{
	  titlefunc:function(robj){
	     return '关联>>相关文稿';
   	  },
	  v1:{vn:'rel_rarity_doc',filterfunc:function(robj,ui){
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
					 	hql = " from Rel A , Doc B where B.id=A.id2 and A.entity1='RELIC' and A.entity2='DOC' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
					 	hql = " from Rel A , Doc B where B.id=A.id2 and A.entity1='RELIC' and A.entity2='DOC' and A.id1="
							+ (robj.items.map['A.objId'] || 0) + " order by A.ord";
	   				ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.Doc',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
	  title: '相关文稿'
      }
    ],    	
	 grid:{
	 	 hide:['A.generateEra','A.eraBegin','A.eraEnd','A.description','A.note','A.keywords','A.era','A.showLocation','A.showFrom','A.showTo','A.material','A.colorMode','A.objsize','A.lastUpdate','B.objId','B.author','B.classa','B.objNo','B.objName','B.generateEra','B.eraBegin','B.eraEnd','B.description','B.objNumber','B.note','B.keywords','B.docAuthor','B.era','B.showLocation','B.showFrom','B.showTo','B.material','B.colorMode','B.objsize','B.lastUpdate'],
		 page:true,
		 hidebtns_objview:[1,2,3,7],
		 hidebtns_objmode:[7],
		 btns:['打开','增加','删除','保存','检索','排序','刷新',{
	   		text: '关联文物',
	   		iconCls: 'plugin_add',
			handler : function(btn){
		    	buildRel(btn,'RELIC','A.objId',['A.objName','A.objNo']);
		    }}]
	},   
  edit:{
  	dlg:{width:600,height:360,title:'文物详细信息',titlefunc:function(robj){
		return '详细>>文物['+robj.items.map['A.objNo']+']';
	}
	},
   	tab:[
   		 {title:"文物详细信息",fset:[{legend:"基本信息",props:[ "A.objId","A.author","A.classa","A.objNo","A.objName","A.grade","A.generateEra","A.eraBegin","A.eraEnd"]},
   		 {legend:"馆藏信息",props:[ "A.note","A.keywords","A.docAuthor","A.showLocation","A.showFrom","A.showTo"]},
   		 {legend:"扩展信息",props:[ "A.era","A.material","A.colorMode","A.objsize"]}]},
      	 {title:"正文内容",fset:[{legend:" ",props:[ "A.description"]}]},
   		 {title:"文物详细信息(英文)",fset:[{legend:"基本信息",props:[ "B.objId","B.author","B.classa","B.objNo","B.objName","B.generateEra","B.eraBegin","B.eraEnd"]},
   		 {legend:"馆藏信息",props:[ "B.note","B.keywords","B.docAuthor","B.showLocation","B.showFrom","B.showTo"]},
   		 {legend:"扩展信息",props:[ "B.era","B.material","B.colorMode","B.objsize"]}]},
      	 {title:"正文内容(英文)",fset:[{legend:" ",props:[ "B.description"]}]}
   	] }
  },
  'dao.hb.Image':{
	 req:{"map":{"psMap":{"map":{"rownum":20,"pss":[["imageId","objNo","objName","imageName","imageSource","imageEngname","imageJapname","imgType","imgColor","cdlabel","imgFile","cdNo","photographer","provider","registerMan","registerTime","regCReceiver","regCTime","scanSuffix","scanMan","scanTime","scanReceiver","scanCTime","suffix","handler","handleTime","handleCTime","haveSmall","haveBigimage","isLivepicture","confirmMan","confirmTime","confirmFlag","returnReceiver","returnTime","mimgWidth","mimgHeight","keywords","description","ggrsimage","descriptionUk","lastUpdate","pathSmall","pathMiddle"]],"cns":["dao.hb.Image"],
	 "hql":"from dao.hb.Image where imageId<"+KX_KV_START+" order by imageId desc"},
	 "javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
	   defautdef:{
	   	 editor:"TextField"//,
	   	 //hide :true
	   },
	 propdef:{
	 	imageSource:{
	 		display:"影像来源",
	   	    editor:'ComboBox',
	        cfg:{
	       	store:new Ext.data.SimpleStore({
		        fields: ['txt', 'val'],
		        data : [['影像利用','影像利用'],['影像局部','影像局部'],['外来影像','外来影像']] 
	        }),
	        displayField:'txt',
	        valueField:'val',
	        typeAhead: true,
	        mode: 'local',
	        triggerAction: 'all',
	        emptyText:'...',
	        selectOnFocus:true
	        }
	 	},
	 	pathSmall:{
	 		display:"小影像",
	 		editor:'ATField',
				renderer:function(itxt,r,col,l){
				 var obj = col.data;
				 var path = '';
				 if (obj.cdlabel)
				   path = obj.cdlabel.replace(/\./g,'/')+"/"+obj.imgFile+"[126PX].jpg";
		    	 var url=Bat.Host+"/files/image/"+path;
				 return "<a href=\""+url+"\" target=\"_blank\">"+path+"</a>";
			}
	 	},
	 	pathMiddle:{
	 		display:"中影像",
	 		editor:'ATField',
				renderer:function(itxt,r,col,l){
				 var obj = col.data;
				 var path = '';
				 if (obj.cdlabel)
				  path = obj.cdlabel.replace(/\./g,'/')+"/"+obj.imgFile+"[400PX].jpg";
		    	 var url=Bat.Host+"/files/image/"+path;
				 return "<a href=\""+url+"\" target=\"_blank\">"+path+"</a>";
			}
	 	},
	   	 imageId:{
	   	 	//hide:true,
	       display:"影像ID",
		   cfg:{
		       readOnly:true
		   }
	   	 },
	   	 objNo:{
	       display:"影像的对象编号"
	   	 },
	   	 imageName:{
	       display:"影像名称"//,
	       //hide:true
	   	 },
	   	 imageEngname:{
	       display:"影像英文名"
	   	 },
	   	 imageJapname:{
	       display:"影像日文名"
	   	 },
	   	 imgType:{
	       display:"影像类型",
	   	    editor:'ComboBox',
	        cfg:{
	       	store:new Ext.data.SimpleStore({
		        fields: ['txt', 'val'],
		        data : [['照片','照片'],['电子文档','电子文档'],['扫描','扫描']] 
	        }),
	        displayField:'txt',
	        valueField:'val',
	        typeAhead: true,
	        mode: 'local',
	        triggerAction: 'all',
	        emptyText:'...',
	        selectOnFocus:true
	        }
	   	 },
	   	 imgColor:{
	       display:"影像颜色",
	   	    editor:'ComboBox',
	        cfg:{
	       	store:new Ext.data.SimpleStore({
		        fields: ['txt', 'val'],
		        data : [['彩色','彩色'],['黑白','黑白']] 
	        }),
	        displayField:'txt',
	        valueField:'val',
	        typeAhead: true,
	        mode: 'local',
	        triggerAction: 'all',
	        emptyText:'...',
	        selectOnFocus:true
	        }
	   	 },
	   	 cdlabel:{
	       display:"影像光盘卷标"
	   	 },
	   	 imgFile:{
	       display:"影像文件名"
	   	 },
	   	 cdNo:{
	       display:"影像存放路径"
	   	 },
	   	 photographer:{
	       display:"影像作者"
	   	 },
	   	 provider:{
	       display:"影像提供单位"
	   	 },
	   	 registerMan:{
	       display:"登记人"
	   	 },
	   	 registerTime:{
	       display:"登记时间",
	       renderer:function(val){
		      return renderDate(val);
		   }
		 },
	   	 regCReceiver:{
	       display:"登记提交接受人"
	   	 },
	   	 regCTime:{
	       display:"登记提交时间",
	       renderer:function(val){
		      return renderDate(val);
		   }
	   	 },
	   	 scanSuffix:{
	       display:"扫描文件后缀"
	   	 },
	   	 scanMan:{
	       display:"扫描者"
	   	 },
	   	 scanTime:{
	       display:"扫描时间",
	       renderer:function(val){
		      return renderDate(val);
		   }
	   	 },
	   	 scanReceiver:{
	       display:"扫描提交接收人"
	   	 },
	   	 scanCTime:{
	       display:"扫描提交时间",
	       renderer:function(val){
		      return renderDate(val);
		   }
	   	 },
	   	 suffix:{
	       display:"图像文件后缀"
	   	 },
	   	 handler:{
	       display:"影像加工者"
	   	 },
	   	 handleTime:{
	       display:"加工时间",
	       renderer:function(val){
		      return renderDate(val);
		   }
	   	 },
	   	 handleCTime:{
	       display:"加工提交时间",
	       renderer:function(val){
		      return renderDate(val);
		   }
	   	 },
	   	 haveSmall:{
	       display:"有小图像"
	   	 },
	   	 haveBigimage:{
	       display:"有中图像"
	   	 },
	   	 isLivepicture:{
	       display:"有大图像"
	   	 },
	   	 confirmMan:{
	       display:"影像确认人"
	   	 },
	   	 confirmTime:{
	       display:"影像确认时间",
	       renderer:function(val){
		      return renderDate(val);
		   }
	   	 },
	   	 confirmFlag:{
	       display:"影像确认结果",
	       	editor:'ComboBox',
	   	    renderer:function(val){
	   			var dtxt ={'Y':'已确认','N':'未确认'};
	   			return dtxt[val];	
	   	    },
	        cfg:{
	       	store:new Ext.data.SimpleStore({
		        fields: ['txt', 'val'],
		        data : [['已确认','Y'],['未确认','N']] 
	        }),
	        displayField:'txt',
	        valueField:'val',
	        typeAhead: true,
	        mode: 'local',
	        triggerAction: 'all',
	        emptyText:'...',
	        selectOnFocus:true
	        }
	   	 },
	   	 returnReceiver:{
	       display:"影像退回接收人"
	   	 },
	   	 returnTime:{
	       display:"影像退回时间",
	       renderer:function(val){
		      return renderDate(val);
		   }
	   	 },
	   	 mimgWidth:{
	       display:"中图像的宽"
	   	 },
	   	 mimgHeight:{
	       display:"中图像的高"
	   	 },
	   	 keywords:{
	       display:"关键词"
	   	 },
	   	 description:{
	       display:"影像说明",
	       editor:'TextArea',
	       hide:true
	   	 },
	   	 descriptionUk:{
	       display:"影像说明(英文)",
	       editor:'TextArea',
	       hide:true
	   	 },	   	 
	   	 ggrsimage:{
	       display:"精细影像",
	   	    editor:'ComboBox',
	   	    renderer:function(val){
	   			var dtxt ={'1':'有','0':'没有'};
	   			return dtxt[val];	
	   	    },
	        cfg:{
	       	store:new Ext.data.SimpleStore({
		        fields: ['txt', 'val'],
		        data : [['有','1'],['没有','0']] 
	        }),
	        displayField:'txt',
	        valueField:'val',
	        typeAhead: true,
	        mode: 'local',
	        triggerAction: 'all',
	        emptyText:'...',
	        selectOnFocus:true
	        }	       
	   	 }
	 },
	 grid:{
	 	 hide:["imageEngname","imageJapname","imgType","imgColor","cdlabel","imgFile","cdNo","photographer","provider","registerMan","registerTime","regCReceiver","regCTime","scanSuffix","scanMan","scanTime","scanReceiver","scanCTime","suffix","handler","handleTime","handleCTime","haveSmall","haveBigimage","isLivepicture","confirmMan","confirmTime","confirmFlag","returnReceiver","returnTime","mimgWidth","mimgHeight","keywords","description","descriptionUk","lastUpdate"],
		 page:true,
		 multiSelect: true,
		 hidebtns_objview:[4,5,6,7],
		 hidebtns_objmode:[4],
		 btns:['打开','检索','刷新','排序',{
	   		text: '关联影像',
	   		iconCls: 'plugin_add',
			handler : function(btn){
		    	buildRel(btn,'IMAGE','imageId',['imageName',"cdlabel","imgFile"]);
		    }
		 },'增加','删除','保存',
		 {
		   		text: '更新中影像宽度高度',
		   	 cls: 'x-btn-text-icon',
		        icon: 'img/htm_import.gif',
			     handler:function(btn){
			     	Ext.MessageBox.confirm("提示","将影像表中所有中影像宽度和高度为空的记录补上宽度和高度，确定继续么?",function(e){
						       				if(e=='yes'){
						       					var f = function(){
					//alert('f');
			   	 	var total=f.taskTotal;
			 		var req={"map":{"psMap":{map:{'method':'P','tid':f.taskId},"javaClass":"java.util.HashMap"},"SN":"TaskHandle"},"javaClass":"java.util.HashMap"};
			   	 	jsonrpc_task.BH.handle(function(data){
			   	 		//alert(data);
			   	 		var cur = parseInt(data[0][0]);
			   	 		var info = data[0][1];
			 			if(cur>=0)
			 			f.taskCur=cur;
				 		var cur=f.taskCur;
				 		//fs.getComponent('pbar2').updateProgress(cur/total,cur+'/'+total+'['+info+']'); 
				 		Ext.MessageBox.updateProgress(cur/total, cur+'/'+total+'['+info+']');

				 		if(cur<total)
				 		  setTimeout(f, 1000);
				 		else{
				 			Ext.MessageBox.hide();
				 		}
			   	 	 },[req]);  		
			       };
			     	
			        Ext.MessageBox.show({
			           title: 'Please wait',
			           msg: 'Loading items...',
			           progressText: 'Initializing...',
			           width:300,
			           progress:true,
			           closable:false
			       });

			    	var req={"map":{"psMap":{map:{'method':'W','fv':{map:{},"javaClass":"java.util.HashMap"}},"javaClass":"java.util.HashMap"},"SN":"DpmHandle"},"javaClass":"java.util.HashMap"};
			    	jsonrpc.BH.handle(function(rd,ex){
			    		if(outputEx(ex,'更新中影像宽度高度异常')){
			    			return;
			    		}
				       f.taskId=rd[0][0];
				       f.taskTotal=parseInt(rd[0][1]);
				       req.map.psMap.map.tid=f.taskId;
				       req.map.psMap.map.method='Z';
				    	jsonrpc.BH.handle(function(rd){
				    		//alert('2222:'+rd[0]);
				    	},[req]);
					   	setTimeout(f, 1000);       
				   	},[req]);       
			              			    
						       				}else{
						       				  return false;
						       				}
			     	})
			     	
					
		 }
		 }]
	   },   edit:{
	  	dlg:{width:600,height:360,title:'影像详细信息',titlefunc:function(robj){
		   return '详细>>影像['+robj.items.map['imageId']+']';
	   }
	   },
	   	//tab:[{title:"影像详细信息",fset:[{legend:" ",props:["imageId","objNo","objName","imageName","imageEngname","imageJapname","imgType","imgColor","cdlabel","imgFile","cdNo","photographer","provider","registerMan","registerTime","regCReceiver","regCTime","scanSuffix","scanMan","scanTime","scanReceiver","scanCTime","suffix","handler","handleTime","handleCTime","haveSmall","haveBigimage","isLivepicture","confirmMan","confirmTime","confirmFlag","returnReceiver","returnTime","mimgWidth","mimgHeight","keywords"]}]}
	   tab:[{title:"影像详细信息1",
	   		fset:[{legend:"基本信息",props:["imageId","objNo","objName","imageName","imageEngname","imageJapname","imgType","imgColor","cdlabel","imgFile"]},
			{legend:"登记信息",props:["cdNo","photographer","provider","registerMan","registerTime","regCReceiver","regCTime","scanSuffix","scanMan","scanTime"	                                                         
	                                                           ]}	         ]},
	         {title:"影像详细信息2",
	         fset:[{legend:" ",props:["scanReceiver","scanCTime","suffix","handler","handleTime","handleCTime","haveSmall","haveBigimage","isLivepicture","confirmMan","confirmTime","confirmFlag","returnReceiver","returnTime","mimgWidth","mimgHeight","keywords","ggrsimage"]}
	         ]},
	         {title:"影像说明(中文)",
	         fset:[{legend:" ",props:["description"]}
	         ]},
	         {title:"影像说明(英文)",
	         fset:[{legend:" ",props:["descriptionUk"]}
	         ]},
	         {title:"影像文件",
	         fset:[{legend:" 本地上传文件请在\“影像来源\"中选择\"外来影像\"",props:["imageSource","pathSmall","pathMiddle"]}
	         ]}       
	         
	   	] }
  
  },
  'dao.hb.ImageCD':{
    	handles:{general:{'before_put':function(ui){
    		for(var i=0,len=ui.objs.length;i<len;i++){
    			var obj = ui.objs[i];
    			var oldval = obj.items.map['confirmFlag'];
    			if(oldval!='Y' && oldval!='N'){
    				if(oldval)
    					obj.items.map['confirmFlag']='Y';
    				else
    					obj.items.map['confirmFlag']='N';    				  
    			}
    		}
    	}
    	}},
	 req:{"map":{"psMap":{"map":{"rownum":10,"pss":[["confirmFlag","newsmallimage","oldsmallimage","shotDate","imageId","objNo","objName","cdlabel","imgFile","imgPath","flag","imageclassName","haveimage","ggrsimage"]],"cns":["dao.hb.ImageCd"],"hql":"from dao.hb.ImageCd order by imageId desc"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
	   defautdef:{
	   	 editor:"TextField",
	   	 cfg:{
	   		  readOnly:false
	   	 }
	   },
	 propdef:{
	   	 imageId:{
	       display:"影像ID",
		   cfg:{
		       readOnly:true
		   }
	   	 },
	   	 imageclassId:{
	       display:"影像分类id"
	   	 },
	   	 imageclassName:{
	       display:"影像分类名称"
	   	 },	   	 
	   	 objNo:{
	       display:"影像的对象编号"
	   	 },
	   	 objName:{
	       display:"影像的对象名称"
	   	 },
	   	 imageName:{
	       display:"影像名称"
	   	 },
	   	 imageEngname:{
	       display:"影像英文名"
	   	 },
	   	 imageJapname:{
	       display:"影像日文名"
	   	 },
	   	 imgType:{
	       display:"影像类型"
	   	 },
	   	 imgColor:{
	       display:"影像颜色"
	   	 },
	   	 cdlabel:{
	       display:"影像光盘卷标"
	   	 },
	   	 imgFile:{
	       display:"影像文件名"
	   	 },
	   	 cdNo:{
	       display:"影像存放路径"
	   	 },
	   	 photographer:{
	       display:"影像作者"
	   	 },
	   	 provider:{
	       display:"影像提供单位"
	   	 },
	   	 registerMan:{
	       display:"登记人"
	   	 },
	   	 registerTime:{
	       display:"登记时间",
	       renderer:function(val){
		      return renderDate(val);
		   }
		 },
	   	 regCReceiver:{
	       display:"登记提交接受人"
	   	 },
	   	 regCTime:{
	       display:"登记提交时间",
	       renderer:function(val){
		      return renderDate(val);
		   }
	   	 },
	   	 scanSuffix:{
	       display:"扫描文件后缀"
	   	 },
	   	 scanMan:{
	       display:"扫描者"
	   	 },
	   	 scanTime:{
	       display:"扫描时间",
	       renderer:function(val){
		      return renderDate(val);
		   }
	   	 },
	   	 scanReceiver:{
	       display:"扫描提交接收人"
	   	 },
	   	 scanCTime:{
	       display:"扫描提交时间",
	       renderer:function(val){
		      return renderDate(val);
		   }
	   	 },
	   	 suffix:{
	       display:"图像文件后缀"
	   	 },
	   	 handler:{
	       display:"影像加工者"
	   	 },
	   	 handleTime:{
	       display:"加工时间",
	       renderer:function(val){
		      return renderDate(val);
		   }
	   	 },
	   	 handleCTime:{
	       display:"加工提交时间",
	       renderer:function(val){
		      return renderDate(val);
		   }
	   	 },
	   	 haveSmall:{
	       display:"有小图像"
	   	 },
	   	 haveBigimage:{
	       display:"有中图像"
	   	 },
	   	 haveimage:{
	       display:"有中小图像"
	   	 },
	   	 isLivepicture:{
	       display:"有大图像"
	   	 },
	   	 confirmMan:{
	       display:"影像确认人"
	   	 },
	   	 confirmTime:{
	       display:"影像确认时间",
	       renderer:function(val){
		      return renderDate(val);
		   }
	   	 },
	   	 returnReceiver:{
	       display:"影像退回接收人"
	   	 },
	   	 returnTime:{
	       display:"影像退回时间",
	       renderer:function(val){
		      return renderDate(val);
		   }
	   	 },
	   	 mimgWidth:{
	       display:"中图像的宽"
	   	 },
	   	 mimgHeight:{
	       display:"中图像的高"
	   	 },
	   	 keywords:{
	       display:"关键词"
	   	 },
	   	 confirmFlag:{
	   	 	//width:10,
	        display:"确认",
			editor : 'Checkbox',
			cfg : {
				checked:true,
				boxLabel:'已确认'
			}		
	   	 },
	   	 newsmallimage:{
	       display:"新网站小影像",
		   renderer:function(val,r,col,l){
	   		   var cdlabel=null;
	   		   var data = col?col.data:r.items.map;
		   	   if(data.cdlabel){
		   	       cdlabel=data.cdlabel.split(".");
		   	   }else{
		   	   	   cdlabel=["","",""];
		   	   }
		   	   var newimgFile= data.imgFile;
		   	   if (!newimgFile)
		   	     newimgFile="";
		   	   var ipos=newimgFile.indexOf(".");
		   	   if (ipos>0){
		   	   	  newimgFile = newimgFile.substring(0,ipos);
		   	   }
		       return "<img style='height:40px;' src='http://192.168.0.50/files/image/"+cdlabel[0]+"/"+cdlabel[1]+"/"+cdlabel[2]+"/"+newimgFile+"[126PX].jpg'></img>";
		   }
	   	 },
 	   	 shotDate:{
	       display:"新网站中影像",
		   renderer:function(val,r,col,l){
	   		   var cdlabel=null;
	   		   var data = col?col.data:r.items.map;
		   	   if(data.cdlabel){
		   	       cdlabel=data.cdlabel.split(".");
		   	   }else{
		   	   	   cdlabel=["","",""];
		   	   }
		   	   var newimgFile= data.imgFile;
		   	   if (!newimgFile)
		   	     newimgFile="";
		   	   var ipos=newimgFile.indexOf(".");
		   	   if (ipos>0){
		   	   	  newimgFile = newimgFile.substring(0,ipos);
		   	   }
		       return "<img style='height:40px;' src='http://192.168.0.50/files/image/"+cdlabel[0]+"/"+cdlabel[1]+"/"+cdlabel[2]+"/"+newimgFile+"[400PX].jpg'></img>";
		   }
	   	 },
	   	 oldsmallimage:{
	   	   display:"老网站小影像",
	       renderer:function(val,r,col,l){
	   		   var cdlabel=null;
	   		   var data=col?col.data:r.items.map;
		   	   if(data.cdlabel){
		   	       cdlabel=data.cdlabel.split(".");
		   	   }else{
		   	   	   cdlabel=["","",""];
		   	   }
		       return "<img style='height:40px;' src='"+getimgPathOld(data.imageId,'s')+"'></img>";
		   }
	   	 },
	   	 ggrsimage:{
	       display:"学术研究大影像标志",
	   	    editor:'ComboBox',
	   	    renderer:function(val){
	   			var dtxt ={'1':'有','0':'没有'};
	   			return dtxt[val];	
	   	    },
	        cfg:{
	       	store:new Ext.data.SimpleStore({
		        fields: ['txt', 'val'],
		        data : [['有','1'],['没有','0']] 
	        }),
	        displayField:'txt',
	        valueField:'val',
	        typeAhead: true,
	        mode: 'local',
	        triggerAction: 'all',
	        emptyText:'...',
	        selectOnFocus:true
	        }	       
	   	 }
	 },
	 grid:{
		 hidebtns_objview:[1],
		// hidebtns_objmode:[5],
		 page:true,
		 multiSelect: true,
		 btns:['打开','保存','检索','排序','刷新',getBtnForExcel({id:"imageId",obj:"dao.hb.ImageCd",item:"[filter,single,currentPage,all]"})/*getBtnImageCDV({item:"[volue_filter,volue_all,path_all]"}),*/
		 ]
	   },   edit:{
	  	dlg:{width:600,height:360,title:'影像详细信息',titlefunc:function(robj){
		   return '详细>>影像['+robj.items.map['imageId']+']';
	   }
	   },
	   	//tab:[{title:"影像详细信息",fset:[{legend:" ",props:["imageId","objNo","objName","imageName","imageEngname","imageJapname","imgType","imgColor","cdlabel","imgFile","cdNo","photographer","provider","registerMan","registerTime","regCReceiver","regCTime","scanSuffix","scanMan","scanTime","scanReceiver","scanCTime","suffix","handler","handleTime","handleCTime","haveSmall","haveBigimage","isLivepicture","confirmMan","confirmTime","confirmFlag","returnReceiver","returnTime","mimgWidth","mimgHeight","keywords"]}]}
	   tab:[{title:"影像详细信息1",fset:[{legend:" ",props:["imageId","objNo","objName","cdlabel","imgFile","imgPath","flag","imageclassName" ,"confirmFlag","haveimage","ggrsimage"]}
	         ]}
	   	] }
  
  },  
'dao.hb.Building':{
   req:{"map":{"psMap":{"map":{"rownum":15,"pss":[["id","objId","author","className","objProdarea","objNo","objName","generateEra","description","objNumber","note","keywords","nameCn","nameUk","briefCn","namehistory","areascene","palacegrade","shapesdesc","buildingdata","nowuse","introduction","introductionUk","lastUpdate"]],"cns":["dao.hb.Building"],"hql":"from dao.hb.Building order by objId desc ","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
       editor:"TextField"
   },
   propdef:{
	   id:{
		display:'序号',
		cfg:{
			readOnly:true
		}
	},
   	    objId:{
	 		display:'编号',
			cfg:{
				readOnly:true
			}
	 	},
	 	author:{
	 		display:'撰稿人'
	 	},
	 	className:{
	 		display:'分类',
	 		editor:"ComboBox",
	 		cfg:{
	 		   listWidth:100,
	 		   width:100,
		       store:getStore({hql:"select id,name from dao.hb.Base where type ='buildingclass' order by name"}),
		        displayField:'name',
		        valueField:'name',
		        typeAhead: true,
		        mode: 'local',
		        triggerAction: 'all',
		        emptyText:'...',
		        selectOnFocus:true
	        }
	 	},	 
	 	objProdarea:{
	 		display:'区域',
	 		editor:"TreeField",
	 		cfg:{
	              	 width:350,
	              	 text:'.....',
	            	 fieldLabel:'树形下拉',
	            	 listHeight:250,
	            	 listWidth:250,
	            	 checkModel:'multiple',
	            	 selectValueModel:'all',
	            	 returnData:'includeParent',
	            	// valueField:'id',
		   		    dataUrl:'/cc/servlet/JSonBaseServlet?',
		   		    baseParams:{mode:'TREE',hql:'',tablename:'dao.hb.Base',fieldnames:'id,name,parentid',filter:" where type=\'buildingarea\' order by ord"
		   		    }
	        }
	 	},		 	
	 	objNo:{
	 		display:'古建编号'
	 	},
	 	objName:{
	 		display:'古建名称'
	 	},
	 	generateEra:{
	 		display:'建筑年代'
	 	},
	   	description:{
	       display:"正文内容",
	       editor:"HtmlEditor",
	       cfg:{	   		  
	   		  width:600,
	   		  hideLabel:true,
	   		  height:200
	   	   }
	   	},
	   	objNumber:{
	       display:"正文字数"
	   	},
	   	note:{
	       display:"备注"	       
	   	},
	   	keywords:{
	       display:"关键词"
	   	},
	   	nameCn:{
	       display:"中文名称"
	   	},
	   	nameUk:{
	       display:"英文名称"
	   	},
	   	briefCn:{
	       display:"中文别名(提示:&lt;i&gt;斜体&lt;/i&gt;)"
	   	},
	   	namehistory:{
	       display:"名称沿革"
	   	},
	   	areascene:{
	       display:"所属区域场景"
	   	},
	   	palacegrade:{
	       display:"宫殿等级"
	   	},
	   	shapesdesc:{
	       display:"基本形制描述"
	   	},
	   	buildingdata:{
	       display:"建筑数据"
	   	},
	   	nowuse:{
	       display:"现用途"
	   	},
	   	introduction:{
	   	   editor:'TextArea',
	       display:"摘要"
	   	},
	   	introductionUk:{
	   	   editor:'TextArea',
	       display:"英文摘要"
	   	}
    },
    grid:{
		 page:true,
		 hidebtns_objview:[1,2,3,7],
		 hidebtns_objmode:[5,7],

		 hide:["description","objId","nameUk","nameCn","keywords","note","objNumber","briefCn","lastUpdate"],
		 btns:['打开','增加','删除','保存','检索','排序','刷新',{
	   		text: '关联建筑',
	   		iconCls: 'plugin_add',
			handler : function(btn){
		    	buildRel(btn,'BUILDING','objId',['objName']);
		    }},{
		     text:'更新到导览',
	        cls: 'x-btn-text-icon',
	        icon: 'img/htm_import.gif',
		     handler:function(btn){
				var f = function(){
				//alert('f');
		   	 	var total=f.taskTotal;
		 		var req={"map":{"psMap":{map:{'method':'P','tid':f.taskId},"javaClass":"java.util.HashMap"},"SN":"TaskHandle"},"javaClass":"java.util.HashMap"};
		   	 	jsonrpc_task.BH.handle(function(data){
		   	 		//alert(data);
		   	 		var cur = parseInt(data[0][0]);
		   	 		var info = data[0][1];
		 			if(cur>=0)
		 			f.taskCur=cur;
			 		var cur=f.taskCur;
			 		//fs.getComponent('pbar2').updateProgress(cur/total,cur+'/'+total+'['+info+']'); 
			 		Ext.MessageBox.updateProgress(cur/total, cur+'/'+total+'['+info+']');

			 		if(cur<total)
			 		  setTimeout(f, 1000);
			 		else{
			 			Ext.MessageBox.hide();
			 		}
		   	 	 },[req]);  		
		       };
		     	
		        Ext.MessageBox.show({
		           title: 'Please wait',
		           msg: 'Loading items...',
		           progressText: 'Initializing...',
		           width:300,
		           progress:true,
		           closable:false
		       });

		    	var req={"map":{"psMap":{map:{'method':'H','fv':{map:{},"javaClass":"java.util.HashMap"}},"javaClass":"java.util.HashMap"},"SN":"DpmHandle"},"javaClass":"java.util.HashMap"};
		    	jsonrpc.BH.handle(function(rd,ex){
		    		if(outputEx(ex,'更新导览JS异常')){
		    			return;
		    		}
			       f.taskId=rd[0][0];
			       f.taskTotal=parseInt(rd[0][1]);
			       req.map.psMap.map.tid=f.taskId;
			       req.map.psMap.map.method='D';
			    	jsonrpc.BH.handle(function(rd){
			    		//alert('2222:'+rd[0]);
			    	},[req]);
				   	setTimeout(f, 1000);       
			   	},[req]);       
		       
//	        	var req={"map":{"psMap":{map:{'method':'D'},"javaClass":"java.util.HashMap"},"SN":"DpmHandle"},"javaClass":"java.util.HashMap"};
//	        	jsonrpc.BH.handle(function(data,ex){
//	        		if(outputEx(ex,'更新导览JS异常'))
//	        			return;
//	        		Ext.MessageBox.alert('更新导览JS成功',data[0]);
//	        	},[req]);            	
		     }
		    }]
	},
	relviews:[{
			titlefunc : function(robj) {
				return '古建<' + robj.items.map['objId'] + '>打标结果';
			},
			v1 : {
				vn : 'dao.hb.RpMarkingResult_obj',
				filterfunc : function(robj, ui) {
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
			  	        hql="from dao.hb.RpMarkingResult where objkey1='BUILDING#DESCRIPTION#"
			  	        +(robj.items.map['A.docid'])+"'";
			  	    else
			  	        hql="from dao.hb.RpMarkingResult  where objkey1='BUILDING#DESCRIPTION#"
			  	        +(robj.items.map['objId']||0)+"'";
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
				}
			},
			v2:{vn:''},
			title : '打标结果'
		}, {
		    titlefunc:function(robj){
			    return '古建<'+robj.items.map['id']+'>相关影像';
		   	},
		    v1:{vn:'rel_building_image',filterfunc:function(robj,ui){
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
					 	hql = " from Rel A , Image B where B.imageId=A.id2 and A.entity1='BUILDING' and A.entity2='IMAGE' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
					 	hql = " from Rel A , Image B where B.imageId=A.id2 and A.entity1='BUILDING' and A.entity2='IMAGE' and A.id1="
							+ (robj.items.map['objId'] || 0) + " order by A.ord";
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
			}},
			v2:{vn:'dao.hb.Image',
			    vfunc:function(vw){
        			var btns = ['检索','排序','刷新'];
					var btns = ['检索', '排序', '刷新'];
					btns[btns.length] = vw.grid.btns[4];
					vw.grid.btns = btns;
					vw.req.map.psMap.map.rownum=5;
	        	}
	        },
            title: '相关影像'
        },{
	  titlefunc:function(robj){
	     return '关联>>相关论文';
   	  },
	  v1:{vn:'rel_building_thesis',filterfunc:function(robj,ui){
		var cn = robj.cns[0];
		var bWF = (cn ==Bat.gvs.AVENSCN);
		var hql;
		if(bWF)
		 	hql = " from Rel A , Thesis B where B.thesisId=A.id2 and A.entity1='BUILDING' and A.entity2='THESIS' and A.id1="
				+ (robj.items.map['A.docid']) + " order by A.ord";
		else
		 	hql = " from Rel A , Thesis B where B.thesisId=A.id2 and A.entity1='BUILDING' and A.entity2='THESIS' and A.id1="
				+ (robj.items.map['objId'] || 0) + " order by A.ord";
		ui.req.map.psMap.map.hql = hql;
		ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.Thesis',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
	  title: '相关论文'
      },{
	  titlefunc:function(robj){
	     return '关联>>相关文稿';
   	  },
	  v1:{vn:'rel_rarity_doc',filterfunc:function(robj,ui){
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
					 	hql = " from Rel A , Doc B where B.id=A.id2 and A.entity1='BUILDING' and A.entity2='DOC' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
					 	hql = " from Rel A , Doc B where B.id=A.id2 and A.entity1='BUILDING' and A.entity2='DOC' and A.id1="
							+ (robj.items.map['objId'] || 0) + " order by A.ord";
	   				ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.Doc',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
	  title: '相关文稿'
      }, {
			titlefunc : function(robj) {
				return '古建<' + robj.items.map['A.id'] + '>相关附件';
			},
			v1 : {
				vn : 'rel_subject_attach',
				filterfunc : function(robj, ui) {
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
						hql = " from Rel A , CeAttachment B where B.id=A.id2 and A.entity1='BUILDING' and A.entity2='CE_ATTACHMENT' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
						hql = " from Rel A , CeAttachment B where B.id=A.id2 and A.entity1='BUILDING' and A.entity2='CE_ATTACHMENT' and A.id1="
							+ (robj.items.map['objId']||0) + " order by A.ord";
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
				}
			},
			v2 : {
				vn : 'dao.hb.CeAttachment',
				vfunc : function(vw) {
					var btns = ['检索', '排序', '刷新'];
					btns[btns.length] = vw.grid.btns[7];
					vw.grid.btns = btns;
					vw.req.map.psMap.map.rownum=5;
				}
			},
			title : '相关附件'
		}, {
			titlefunc : function(robj) {
				return '古建<' + robj.items.map['objId'] + '>相关文物';
			},
			v1 : {
				vn : 'rel_doc_relic',
				filterfunc : function(robj, ui) {
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
					 	hql = " from Rel A , Relic B where B.objId=A.id2 and A.entity1='BUILDING' and A.entity2='RELIC' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
					 	hql = " from Rel A , Relic B where B.objId=A.id2 and A.entity1='BUILDING' and A.entity2='RELIC' and A.id1="
							+ (robj.items.map['objId'] || 0)+ " order by A.ord";
					
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
				}
			},
			v2 : {
				vn : 'dao.hb.Relic',
				vfunc : function(vw) {
					var btns = ['检索', '排序', '刷新'];
					btns[btns.length] = vw.grid.btns[7];
					vw.grid.btns = btns;
					vw.req.map.psMap.map.rownum=5;
				}
			},
			title : '相关文物'
		},
		{
			titlefunc : function(robj) {
				return '古建<' + robj.items.map['A.objId'] + '>相关专题';
			},
			v1 : {
				vn : 'rel_doc_subject',
				filterfunc : function(robj, ui) {
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
						hql = " from Rel A , Subject B where B.id=A.id2 and A.entity1='BUILDING' and A.entity2='SUBJECT' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
						hql = " from Rel A , Subject B where B.id=A.id2 and A.entity1='BUILDING' and A.entity2='SUBJECT' and A.id1="
							+ (robj.items.map['objId']||0) + " order by A.ord";
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
				}
			},
			v2 : {
				vn : 'dao.hb.Subject',
				vfunc : function(vw) {
					var btns = ['检索', '排序', '刷新'];
					btns[btns.length] = vw.grid.btns[7];
					vw.grid.btns = btns;
					vw.req.map.psMap.map.rownum=5;
				}
			},
			title : '相关专题'
		},
		{
	  titlefunc:function(robj){
	     return '关联>>相关音视频';
   	  },
	  v1:{vn:'rel_doc_audiovideo',filterfunc:function(robj,ui){
		var cn = robj.cns[0];
		var bWF = (cn ==Bat.gvs.AVENSCN);
		var hql;
		if(bWF)
		 	hql = " from Rel A , AudioVideo B where B.id=A.id2 and A.entity1='BUILDING' and A.entity2='AUDIO_VIDEO' and A.id1="
				+ (robj.items.map['A.docid'])+" order by A.ord";
		else
		 	hql = " from Rel A , AudioVideo B where B.id=A.id2 and A.entity1='BUILDING' and A.entity2='AUDIO_VIDEO' and A.id1="
				+ (robj.items.map['objId'] || 0)+" order by A.ord";
		ui.req.map.psMap.map.hql = hql;		
		ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.AudioVideo',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
	  title: '相关音视频'
      }
		],    	
    edit:{
  	    dlg:{width:600,height:360,title:'古建信息',titlefunc:function(robj){
		    return '古建详细['+robj.items.map['objNo']+']';
	    }
	},
   	tab:[
   		 {title:"详细信息",fset:[{legend:"基本信息",props:["objId","author","className","objProdarea","objNo","objName","generateEra"]},
   		 {legend:"其他",props:["note","keywords","nameCn","nameUk","briefCn","namehistory","areascene","palacegrade","shapesdesc","buildingdata","nowuse"]}]},
   		 {title:"正文内容",fset:[{legend:" ",props:["description"]}]},
   		 {title:"摘要",fset:[{legend:" ",props:["introduction"]}]},
   		 {title:"英文摘要",fset:[{legend:" ",props:["introductionUk"]}]}
   	]}
  },
'dao.hb.Figure':{
   req:{"map":{"psMap":{"map":{"rownum":15,"pss":[["objId","author","objName","className","generateEra","subject","objTitle","email","introduction","description","objNumber","note","keywords","name","reigntitle","templetitle","posthumoustitle","birthdeathyear","nativeplace","buryplace","lastUpdate"],
   ["objId","author","objName","className","generateEra","subject","objTitle","email","introduction","description","objNumber","note","keywords","name","reigntitle","templetitle","posthumoustitle","birthdeathyear","nativeplace","buryplace","lastUpdate"]],"cns":["dao.hb.Figure","dao.hb.FigureUk"],"hql":"from dao.hb.Figure A ,dao.hb.FigureUk B where A.objId=B.objId order by A.objId desc ","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
       editor:"TextField"
   },
   propdef:{
   	    "A.objId":{
	 		display:'人物id',
			cfg:{
				readOnly:true
			}
	 	},
	 	"A.author":{
	 		display:'撰稿人'
	 	},
	 	"A.objName":{
	 		display:'人物姓名'
	 	},	 
	 	/*"A.className":{
	 		display:'分类',
	 		editor:"ComboBox",
		 		cfg:{
		 		   listWidth:100,
		 		   width:100,
			       store:getStore({hql:"select id,name from dao.hb.Base where type='person'"}),
			        displayField:'name',
			        valueField:'name',
			        typeAhead: true,
			        mode: 'local',
			        triggerAction: 'all',
			        emptyText:'...',
			        selectOnFocus:true
		        }
	 	},	*/
		"A.className" : {
				display : '分类',						
		 		editor :'TreeField',
	              cfg:{
	              	 width:350,
	              	 text:'.....',
	            	 fieldLabel:'树形下拉',
	            	 listHeight:250,
	            	 listWidth:250,
	            	 checkModel:'multiple',
	            	 selectValueModel:'all',
	            	 returnData:'includeParent',
	            	// valueField:'id',
		   		    dataUrl:'/cc/servlet/JSonBaseServlet?',
		   		    baseParams:{mode:'TREE',hql:'',tablename:'dao.hb.Base',fieldnames:'id,name',filter:" where type=\'person\' order by name"
		   		    }
	              }
		},	 	
	 	"A.generateEra":{
	 		display:'时代'
	 	},
	 	"A.subject":{
	 		display:'学术方向'
	 	},
	 	"A.objTitle":{
	 		display:'职称'
	 	},
	   	"A.description":{
	       display:"正文内容",
	       editor:"HtmlEditor",
	       cfg:{	   		  
	   		  width:600,
	   		  hideLabel:true,
	   		  height:200
	   	   }
	   	},
	   	"A.introduction":{
	       display:"内容摘要",
	       editor:"HtmlEditor",
	       cfg:{	   		  
	   		  width:600,
	   		  hideLabel:true,
	   		  height:200
	   	   }	       
	   	},
	   	"A.email":{
	       display:"Email"	       
	   	},
	   	"A.objNumber":{
	       display:"正文字数"
	   	},
	   	"A.note":{
	       display:"备注"
	   	},
	   	"A.keywords":{
	       display:"关键词"
	   	},	   	
	   	"A.name":{
	       display:"名称"
	   	},
	   	"A.reigntitle":{
	       display:"年号"
	   	},
	   	"A.templetitle":{
	       display:"庙号（字号）"
	   	},
	   	"A.posthumoustitle":{
	       display:"谥号"
	   	},
	   	"A.birthdeathyear":{
	       display:"生卒年"
	   	},
	   	"A.nativeplace":{
	       display:"出生地（籍贯）"
	   	},
	   	"A.buryplace":{
	       display:"葬亡地"
	   	},	   	
   	    "B.objId":{
	 		display:'人物id(英文)',
			cfg:{
				readOnly:true
			}
	 	},
	 	"B.author":{
	 		display:'撰稿人(英文)'
	 	},
	 	"B.objName":{
	 		display:'姓名(英文)'
	 	},	 
	 	"B.className":{
	 		display:'分类(英文)'
	 	},		 	
	 	"B.generateEra":{
	 		display:'时代(英文)'
	 	},
	 	"B.subject":{
	 		display:'学术方向(英文)'
	 	},
	 	"B.objTitle":{
	 		display:'职称(英文)'
	 	},
	   	"B.description":{
	       display:"正文内容(英文)",
	       editor:"HtmlEditor",
	       cfg:{	   		  
	   		  width:600,
	   		  hideLabel:true,
	   		  height:200
	   	   }
	   	},
	   	"B.introduction":{
	       display:"内容摘要(英文)",
	       editor:"HtmlEditor",
	       cfg:{	   		  
	   		  width:600,
	   		  hideLabel:true,
	   		  height:200
	   	   }	       
	   	},
	   	"B.email":{
	       display:"Email(英文)"	       
	   	},
	   	"B.objNumber":{
	       display:"正文字数(英文)"
	   	},
	   	"B.note":{
	       display:"备注(英文)"
	   	},
	   	"B.keywords":{
	       display:"关键词(英文)"
	   	},
	   	"B.name":{
	       display:"名称(英文)"
	   	},
	   	"B.reigntitle":{
	       display:"年号(英文)"
	   	},
	   	"B.templetitle":{
	       display:"庙号(字号)(英文)"
	   	},
	   	"B.posthumoustitle":{
	       display:"谥号(英文)"
	   	},
	   	"B.birthdeathyear":{
	       display:"生卒年(英文)"
	   	},
	   	"B.nativeplace":{
	       display:"出生地(籍贯)(英文)"
	   	},
	   	"B.buryplace":{
	       display:"葬亡地(英文)"
	   	}	   	
    },
    grid:{
		 page:true,
		 hide:["A.description","A.introduction","A.subject","A.email","A.objNumber","A.note","A.objId","B.objId","B.author","B.objName","B.className","B.generateEra","B.subject","B.objTitle","B.email","B.introduction","B.description","B.objNumber","B.note","B.keywords","A.lastUpdate","B.lastUpdate"],
		 hidebtns_objview:[1,2,3,7],
		 hidebtns_objmode:[7],
		 btns:['打开','增加','删除','保存','检索','排序','刷新',{
	   		text: '关联人物',
	   		iconCls: 'plugin_add',
			handler : function(btn){
		    	buildRel(btn,'FIGURE','A.objId',['A.objName']);
		    }}]
	},   
	relviews:[{
			titlefunc : function(robj) {
				return '人物<' + robj.items.map['A.objId'] + '>相关附件';
			},
			v1 : {
				vn : 'rel_subject_attach',
				filterfunc : function(robj, ui) {
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
						hql = " from Rel A , CeAttachment B where B.id=A.id2 and A.entity1='FIGURE' and A.entity2='CE_ATTACHMENT' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
						hql = " from Rel A , CeAttachment B where B.id=A.id2 and A.entity1='FIGURE' and A.entity2='CE_ATTACHMENT' and A.id1="
							+ (robj.items.map['A.objId']||0) + " order by A.ord";
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
				}
			},
			v2 : {
				vn : 'dao.hb.CeAttachment',
				vfunc : function(vw) {
					var btns = ['检索', '排序', '刷新'];
					btns[btns.length] = vw.grid.btns[7];
					vw.grid.btns = btns;
					vw.req.map.psMap.map.rownum=5;
				}
			},
			title : '相关附件'
		},{
			titlefunc : function(robj) {
				return '人物<' + robj.items.map['A.objId'] + '>打标结果';
			},
			v1 : {
				vn : 'dao.hb.RpMarkingResult_obj',
				filterfunc : function(robj, ui) {
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
			  	        hql="from dao.hb.RpMarkingResult where objkey1='FIGURE#DESCRIPTION#"
			  	        +(robj.items.map['A.docid'])+"'";
			  	    else
			  	        hql="from dao.hb.RpMarkingResult  where objkey1='FIGURE#DESCRIPTION#"
			  	        +(robj.items.map['A.objId']||0)+"'";
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
				}
			},
			v2:{vn:''},
			title : '打标结果'
		},{
		    titlefunc:function(robj){
			    return '人物<'+robj.items.map['A.objId']+'>相关论文';
		   	},
		    v1:{vn:'rel_figure_thesis',filterfunc:function(robj,ui){
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
					 	hql = " from Rel A , Thesis B where B.thesisId=A.id2 and A.entity1='FIGURE' and A.entity2='THESIS' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
					 	hql = " from Rel A , Thesis B where B.thesisId=A.id2 and A.entity1='FIGURE' and A.entity2='THESIS' and A.id1="
							+ (robj.items.map['A.objId'] || 0) + " order by A.ord";
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
			}},
		  v2:{vn:'dao.hb.Thesis',vfunc:function(vw){
	        	var btns = ['检索','排序','刷新'];
	        	btns[btns.length]=vw.grid.btns[7];
	        	vw.grid.btns=btns;
			  	vw.req.map.psMap.map.rownum=5;
		  	}
		  },
           title: '相关论文'
        },{
		    titlefunc:function(robj){
			    return '人物<'+robj.items.map['A.objId']+'>相关影像';
		   	},
		    v1:{vn:'rel_figure_image',filterfunc:function(robj,ui){
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
					 	hql = " from Rel A , Image B where B.imageId=A.id2 and A.entity1='FIGURE' and A.entity2='IMAGE' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
					 	hql = " from Rel A , Image B where B.imageId=A.id2 and A.entity1='FIGURE' and A.entity2='IMAGE' and A.id1="
							+ (robj.items.map['A.objId'] || 0) + " order by A.ord";
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
			}},
			v2:{vn:'dao.hb.Image',
			    vfunc:function(vw){
        			var btns = ['检索','排序','刷新'];
					var btns = ['检索', '排序', '刷新'];
					btns[btns.length] = vw.grid.btns[4];
					vw.grid.btns = btns;
					vw.req.map.psMap.map.rownum=5;
	        	}
	        },
            title: '相关影像'
        },{
		    titlefunc:function(robj){
			    return '人物<'+robj.items.map['A.objId']+'>相关捐献';
		   	},
		    v1:{vn:'rel_figure_contribution',filterfunc:function(robj,ui){
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
					 	hql = " from Rel A , Contribution B where B.conId=A.id2 and A.entity1='FIGURE' and A.entity2='CONTRIBUTION' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
					 	hql = " from Rel A , Contribution B where B.conId=A.id2 and A.entity1='FIGURE' and A.entity2='CONTRIBUTION' and A.id1="
							+ (robj.items.map['A.objId'] || 0) + " order by A.ord";							
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
			}},
			v2:{vn:'dao.hb.Contribution',
			    vfunc:function(vw){
        			var btns = ['检索','排序','刷新'];
        			btns[btns.length]=vw.grid.btns[7];
        			vw.grid.btns=btns;
		  			vw.req.map.psMap.map.rownum=5;
	        	}
	        },
            title: '相关捐献'
        },{
		    titlefunc:function(robj){
			    return '人物<'+robj.items.map['A.objId']+'>相关文稿';
		   	},
	  v1:{vn:'rel_building_doc',filterfunc:function(robj,ui){
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
					 	hql = " from Rel A , Doc B where B.id=A.id2 and A.entity1='FIGURE' and A.entity2='DOC' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
					 	hql = " from Rel A , Doc B where B.id=A.id2 and A.entity1='FIGURE' and A.entity2='DOC' and A.id1="
							+ (robj.items.map['A.objId'] || 0) + " order by A.ord";
	   				ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.Doc',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
	  title: '相关文稿'
      }],    	
    edit:{
  	    dlg:{width:600,height:380,title:'人物详细信息',titlefunc:function(robj){
		    return '人物姓名['+robj.items.map['A.objName']+']';
	    }
	},
   	tab:[
   		 {title:"人物详细信息",fset:[{legend:" ",props:["A.objId","A.author","A.name","A.objName","A.className","A.generateEra","A.subject","A.objTitle","A.email","A.reigntitle","A.templetitle","A.posthumoustitle","A.birthdeathyear","A.nativeplace","A.buryplace"]},
   		 	{legend:" ",props:["A.note","A.keywords"]}]},
	 	 {title:"内容摘要",fset:[{legend:" ",props:["A.introduction"]}]},
   		 {title:"正文内容",fset:[{legend:" ",props:["A.description"]}]},
   		 {title:"人物详细信息(英文)",fset:[{legend:" ",props:["B.objId","B.author","B.objName","B.className","B.generateEra","B.subject","B.objTitle","B.email"]},
   		 	{legend:" ",props:["B.note","B.keywords"]},{legend:" ",props:["B.name","B.reigntitle","B.templetitle","B.posthumoustitle","B.birthdeathyear","B.nativeplace","B.buryplace"]}]},
	 	 {title:"内容摘要(英文)",fset:[{legend:" ",props:["B.introduction"]}]},
   		 {title:"正文内容(英文)",fset:[{legend:" ",props:["B.description"]}]}
   	]}
  },
  'dao.hb.Book':{
   req:{"map":{"psMap":{"map":{"rownum":15,"pss":[["objId","author","className","objProdarea","objNo","objName","generateEra","objAuthor","description","objNumber","sell","iscollection","iscommend","format","bookbinding","wordPicture","packaging","price","countRemark","note","keywords","publishHouse","lastUpdate","reldocid"]],"cns":["dao.hb.Book"],"hql":"from dao.hb.Book order by objId desc","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
       editor:"TextField"
   },
   propdef:{
   	    objId:{
	 		display:'图书id',
			cfg:{
				readOnly:true
			}
	 	},
	 	author:{
	 		display:'撰稿人'
	 	},
	 	className:{
	 		display:'内容分类'
	 	},	 
	 	objProdarea:{
	 		display:'形式分类'
	 	},
	 	objNo:{
	 		display:'图书编号'
	 	},
	 	objName:{
	 		display:'图书名称'
	 	},
	 	generateEra:{
	 		display:'出版日期'
	 	},
	   	objAuthor:{
	       display:"图书作者"
	   	},
	   	description:{
	       display:"图书摘要",
	       editor:"HtmlEditor",
	       cfg:{	   		  
	   		  width:600,
	   		  hideLabel:true,
	   		  height:200
	   	   }	       
	   	},
	   	objNumber:{
	       display:"摘要字数"	       
	   	},	   	
	   	/*generateDate:{
	       display:"出版时间",
	       renderer:function(val){
		      return renderDate(val);
		   }
	   	},*/
	   	sell:{
	       display:"图书总目在售标记"
	   	},
	   	iscollection:{
	       display:"是否介绍故宫",
	   	    renderer:function(val){
	   			var dtxt ={'0':'否','1':'是'};
	   			return dtxt[val];	
	   	    },
	   	    editor:'ComboBox',
	        cfg:{
	       	store:new Ext.data.SimpleStore({
		        fields: ['txt', 'val'],
		        data : [['否','0'],['是','1']] 
	        }),
	        displayField:'txt',
	        valueField:'val',
	        typeAhead: true,
	        mode: 'local',
	        triggerAction: 'all',
	        emptyText:'...',
	        selectOnFocus:true
	        }	       
	   	},
	   	iscommend:{
	       display:"是否推荐",
	   	    renderer:function(val){
	   			var dtxt ={'0':'否','1':'是'};
	   			return dtxt[val];	
	   	    },
	   	    editor:'ComboBox',
	        cfg:{
	       	store:new Ext.data.SimpleStore({
		        fields: ['txt', 'val'],
		        data : [['否','0'],['是','1']] 
	        }),
	        displayField:'txt',
	        valueField:'val',
	        typeAhead: true,
	        mode: 'local',
	        triggerAction: 'all',
	        emptyText:'...',
	        selectOnFocus:true
	        }		       
	   	},	   	
	   	format:{
	       display:"图书总目开本"
	   	},
	   	bookbinding:{
	       display:"图书总目装订"
	   	},
	   	wordPicture:{
	       display:"图书总目字数/图数"
	   	},
	   	packaging:{
	       display:"图书总目包本"
	   	},
	   	price:{
	       display:"图书总目价格"
	   	},
	   	countRemark:{
	       display:"图书总目订数/备注"
	   	},
	   	note:{
	       display:"备注"
	   	},
	   	keywords:{
	       display:"关键词"
	   	},
	   	publishHouse:{
	       display:"出版社"
	   	},
	   	reldocid:{
	       display:"相关文稿编号"
	   	}
    },
    grid:{
		 page:true,
		 hide:["objId","description","sell","wordPicture","packaging","countRemark","note","author","objNumber","price","keywords","bookbinding","format","lastUpdate"],
		 hidebtns_objview:[1,2,3],	
		 hidebtns_objmode:[],
		 btns:['打开','增加','删除','保存','检索','排序','刷新']
	},
	relviews:[{
			titlefunc : function(robj) {
				return '图书<' + robj.items.map['objId'] + '>打标结果';
			},
			v1 : {
				vn : 'dao.hb.RpMarkingResult_obj',
				filterfunc : function(robj, ui) {
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
			  	        hql="from dao.hb.RpMarkingResult where objkey1='BOOK#DESCRIPTION#"
			  	        +(robj.items.map['A.docid'])+"'";
			  	    else
			  	        hql="from dao.hb.RpMarkingResult  where objkey1='BOOK#DESCRIPTION#"
			  	        +(robj.items.map['objId']||0)+"'";
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
				}
			},
			v2:{vn:''},
			title : '打标结果'
		},{
		    titlefunc:function(robj){
			    return '图书<'+robj.items.map['objId']+'>相关影像';
		   	},
		    v1:{vn:'rel_book_image',filterfunc:function(robj,ui){
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
					 	hql = " from Rel A , Image B where B.imageId=A.id2 and A.entity1='BOOK' and A.entity2='IMAGE' and A.id1="
							+ (robj.items.map['A.docid']+" order by A.ord");
					else
					 	hql = " from Rel A , Image B where B.imageId=A.id2 and A.entity1='BOOK' and A.entity2='IMAGE' and A.id1="
							+ ((robj.items.map['objId'] || 0)+" order by A.ord");					  	
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
			}},
			v2:{vn:'dao.hb.Image',
			    vfunc:function(vw){
        			var btns = ['检索','排序','刷新'];
					var btns = ['检索', '排序', '刷新'];
					btns[btns.length] = vw.grid.btns[4];
					vw.grid.btns = btns;
					vw.req.map.psMap.map.rownum=5;
	        	}
			
	        },
            title: '相关影像'
        },{
        titlefunc:function(robj){
           return '图书<'+robj.items.map['objId']+'>相关论文';
        },
        v1:{vn:'dao.hb.Thesis_rel',filterfunc:function(robj,ui){
			var cn = robj.cns[0];
			var bWF = (cn ==Bat.gvs.AVENSCN);
			var hql;
			if(bWF)
	  	        hql="from dao.hb.Rel A , dao.hb.Thesis B  where A.id2=B.thesisId  and A.entity2='THESIS' and A.entity1='BOOK' " +
        			" and A.id1="+(robj.items.map['A.docid']||robj.items.map['B.catalogId'])+" order by A.ord";
	  	    else
	  	        hql="from dao.hb.Rel A , dao.hb.Thesis B  where A.id2=B.thesisId  and A.entity2='THESIS' and A.entity1='BOOK' " +
        			" and A.id1="+(robj.items.map['objId']||0)+" order by A.ord";
			ui.req.map.psMap.map.hql = hql;
			ui.hql = hql;
        }},
        v2:{vn:'dao.hb.Thesis',
	        vfunc : function(vw) {
				var btns = ['检索', '排序', '刷新'];
				btns[btns.length] = vw.grid.btns[7];
				vw.grid.btns = btns;
				vw.req.map.psMap.map.rownum=5;
			}
        },
        title: '相关论文'
	  }
    ],    	
    edit:{
  	    dlg:{width:600,height:380,title:'图书详细信息',titlefunc:function(robj){
		    return '图书详细['+robj.items.map['objNo']+']';
	    }
	},
   	tab:[
   		 {title:"详细信息",fset:[{legend:" ",props:["objId","author","className","objProdarea","objNo","objName","generateEra","publishHouse","reldocid"]},
   		 {legend:" ",props:["objAuthor","sell","iscollection","iscommend","format","bookbinding","wordPicture"]},
   		 {legend:" ",props:["packaging","price","countRemark","note","keywords"]}]},
   		 {title:"图书摘要",fset:[{legend:" ",props:["description"]}]}
   	]}
  },
   'dao.hb.Thesis':{
   req:{"map":{"psMap":{"map":{"rownum":15,"pss":[[
   	"thesisId","thesisName","isdel","repeatid","chapterNum","pageFrom","haverel","relinfo","thesisClass","thesisType","author","firstauthor","thesisSource","publishHouse","publishDate",
	"handleMode","content","wordNum","pageNum","registerMan","registerTime","registerCTime","handler",
	"handleTime","handleCTime","collateMan","collateTime","collateCTime","confirmMan","confirmTime",
	"confirmFlag","returnTime","returnReceiver","language","transFlag","sourceRem","pdfFile","pdfidxFile","thesisSort","thesisLabel","iscommend","era","translator","authormode","lastUpdate","catalogId","path","provider"
   ]],
   //"cns":["dao.hb.Thesis"],"hql":"from dao.hb.Thesis ","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   "cns":["dao.hb.Thesis"],"hql":"from dao.hb.Thesis where ((isdel<>'y' and isdel<>'Y') or (isdel is null)) order by thesisSource,publishDate,thesisName,thesisId","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
       editor:"TextField"
   },
   propdef:{ 	
   	    thesisId:{
	 		display:'论文专著编号',
			cfg:{
				readOnly:true
			}
	 	},
	 	thesisName:{
	 		display:'论文专著名称'
	 	},
	 	chapterNum:{
	 		display:'期刊章节[专著获奖情况]'
	 	},	 	
	 	pageFrom:{
	 		display:'论文首页页码'
	 	},	 	
	 	isdel:{
	 		display:'是否删除(Y/N)'
	 	},	
	 	repeatid:{
	 		display:'论文重复id(>6000)'
	 	},	 	
	 	thesisClass:{
	 		display:'论文专著类型',
	   	    renderer:function(val){
	   			var dtxt ={'0':'论文','1':'专著','2':'期刊'};
	   			return dtxt[val];	
	   	    },
	   	    editor:'ComboBox',
	        cfg:{
	       	store:new Ext.data.SimpleStore({
		        fields: ['txt', 'val'],
		        data : [['论文','0'],['专著','1'],['期刊','2']] 
	        }),
	        displayField:'txt',
	        valueField:'val',
	        typeAhead: true,
	        mode: 'local',
	        triggerAction: 'all',
	        emptyText:'...',
	        selectOnFocus:true
	        }
	 	},	 			
	 	thesisType:{
	 	    display:'格式类型',
	   	    renderer:function(val){
	   			var dtxt ={'-1':'空','2':'有目录pbs','1':'无目录pbs','0':'text'};
	   			return dtxt[val];	
	   	    },
	   	    editor:'ComboBox',
	        cfg:{
	       	store:new Ext.data.SimpleStore({
		        fields: ['txt', 'val'],
		        data : [['空','-1'],['有目录pbs','2'],['无目录pbs','1'],['text','0']] 
	        }) ,
	        displayField:'txt',
	        valueField:'val',
	        typeAhead: true,
	        mode: 'local',
	        triggerAction: 'all',
	        emptyText:'...',
	        selectOnFocus:true
	       }	
	 	},	 
	 	author:{
	 		display:'作者'
	 	},
	 	firstauthor:{
	 		display:'第一作者'
	 	},
	   	thesisSource:{
	       display:"来源"
	   	},
	   	publishHouse:{
	       display:"出版社"
	   	},
	   	publishDate:{
	       display:"发表时间"
	   	},
	   	handleMode:{
	       display:"加工方式",
	   	    renderer:function(val){
	   			var dtxt ={'0':'text','1':'pbs','-1':'无内容'};
	   			if(val==-1){
	   				return "";
	   			}
	   			return dtxt[val];	
	   	    },
	   	    editor:'ComboBox',
	        cfg:{
	       	store:new Ext.data.SimpleStore({
		        fields: ['txt', 'val'],
		        data : [['text','0'],['pbs','1'],['无内容','-1']] 
	        }),
	        displayField:'txt',
	        valueField:'val',
	        typeAhead: true,
	        mode: 'local',
	        triggerAction: 'all',
	        emptyText:'...',
	        selectOnFocus:true
	        }
	 		
	   	},
	   	content:{
	       display:"论文专著内容",
	       editor:"HtmlEditor",
	       cfg:{	   		  
			  hideLabel:true,
			  width:600,
	   		  height:200
	   	   }	
	   	},
	   	wordNum:{
	       display:"字数"
	   	},
	   	pageNum:{
	       display:"页数"
	   	},
	   	registerMan:{
			cfg:{readOnly:true},
			display:"登记人"
	   	},
	   	registerTime:{
	       display:"登记时间",
	       cfg:{readOnly:true},
           renderer:function(val){
		      return renderDate(val);
		   }
	   	},
	   	registerCTime:{
	       display:"登记提交时间",
	       cfg:{readOnly:true},
           renderer:function(val){
		      return renderDate(val);
		   }      
	   	},
	   	handler:{
	       display:"加工者"	       
	   	},
	   	handleTime:{
	       display:"加工时间",
           renderer:function(val){
		      return renderDate(val);
		   }      
	   	},
	   	handleCTime:{
	       display:"加工提交时间",
           renderer:function(val){
		      return renderDate(val);
		   }      
	   	},
	   	collateMan:{
	       display:"校对者"
	   	},
	   	collateTime:{
	       display:"校对时间",
           renderer:function(val){
		      return renderDate(val);
		   }      
	   	},
	   	collateCTime:{
	       display:"校对提交时间",
           renderer:function(val){
		      return renderDate(val);
		   }      
	   	},
	    confirmMan:{
	       cfg:{readOnly:true},
	       display:"确认者"	       
	   	},
	   	confirmTime:{
	   	   cfg:{readOnly:true},
	       display:"确认时间",
           renderer:function(val){
		      return renderDate(val);
		   }      
	   	},
	   	confirmFlag:{
			editor : 'ComboBox',
			cfg : {
				store : new Ext.data.SimpleStore({
					fields : ['txt', 'val'],
					data : [['已确认', 'Y'], ['未确认', 'N']]
				}),
				displayField : 'txt',
				valueField : 'val',
				typeAhead : true,
				mode : 'local',
				triggerAction : 'all',
				emptyText : '...',
				selectOnFocus : true
			},
	       display:"确认结果(pdf)",
	 		renderer:function(val){
	 			if(val=="Y"){
	 				return "已确认";
	 			}else{
	 				return "未确认";
	 			}
	 		}
	   	},
	   	returnTime:{
	       display:"原稿退回时间",
           renderer:function(val){
		      return renderDate(val);
		   }      
	   	},
	   	returnReceiver:{
	       display:"退回的接收人"
	   	},
	   	language:{
	       display:"语种"
	   	},
	   	transFlag:{
	       display:"翻译稿标志位"
	   	},
	   	sourceRem:{
	       display:"论文来源备注",
	       editor:"HtmlEditor",
	       cfg:{	   		  
			  hideLabel:true,
	   		  width:600,
	   		  height:200
	   	   }	
	   	},
	   	pdfFile:{
	       display:"PDF文件名"
	   	},
	   	pdfidxFile:{
	       display:"PDF索引文件名"
	   	},
	   	thesisSort:{
	       display:"论文分类",	      
           editor :'TreeField',
           cfg:{
           	 width:350,
          	 text:'.....',
        	 fieldLabel:'树形下拉',
        	 listHeight:250,
        	 listWidth:350,
        	 valueField:'text',
        	 checkModel:'multiple',
        	 selectValueModel:'all',
        	 returnData:'includeParent',
   		     dataUrl:'/cc/servlet/JSonBaseServlet?',
   		     baseParams:{mode:'TREETHESISSORT',hql:'',tablename:'',fieldnames:'id,name,parentid',filter:" order by name"}
   	       }   	       
	   	},
	   	thesisLabel:{
	       display:"论文标注"
	   	},
	   	iscommend:{
	       display:"是否推荐",
	   	    renderer:function(val){
	   			var dtxt ={'0':'否','1':'是'};
	   			return dtxt[val];	
	   	    },
	   	    editor:'ComboBox',
	        cfg:{
	       	store:new Ext.data.SimpleStore({
		        fields: ['txt', 'val'],
		        data : [['否','0'],['是','1']] 
	        }),
	        displayField:'txt',
	        valueField:'val',
	        typeAhead: true,
	        mode: 'local',
	        triggerAction: 'all',
	        emptyText:'...',
	        selectOnFocus:true
	        }	       
	   	},
	   	era:{
	       display:"时代"
	   	},
	   	translator:{
	       display:"译校者及译校方式"
	   	},
	   	authormode:{
	       display:"发表责任人著作方式"
	   	},
	   	haverel:{
	       display:"是否引用"
	   	},
	   	relinfo:{
	       display:"引用的资源"
	   	},
	   	catalogId:{
	       display:"期刊id"
	   	},
	   	provider:{
	       display:"提供者",
	       editor :'TreeField',				
				cfg:{
					text:'.....',
			    	fieldLabel:'树形下拉',
			    	listHeight:250,
			    	listWidth:500,
			    	 //valueField:'id',   //wjh
			    	valueField:'hiddenValue', 
			    	trimValue1:'Y',
			    	displayField:'text',
			    	checkModel:'multiple',
				    dataUrl:'/cc/servlet/JSonBaseServlet?',
				    baseParams:{mode:'TREEAWAI',hql:'',haveHiddenValue:'Y',haveOrg:'N',tablename:'',fieldnames:'id,name,parentid',filter:" order by name"},				
					
					readOnly:false
				}
	   	}		   	
	   	
    },
    grid:{    	 
		 page:true,
		 hidebtns_objview:[1,2,3,7],		 
		 hidebtns_objmode:[7],
		 hide:["thesisSource","publishHouse","content","sourceRem","handleMode","wordNum","pageNum","registerMan","registerTime","registerCTime","handler",
	           "handleTime","handleCTime","collateMan","collateTime","collateCTime","confirmMan","confirmTime",
	           "confirmFlag","returnTime","returnReceiver","language","transFlag","pdfFile","pdfidxFile","lastUpdate"
         ],
		 btns:['打开','增加','删除','保存','检索','排序','刷新',{
	   		text: '关联论文',
	   		iconCls: 'plugin_add',
			handler : function(btn){
		    	buildRel(btn,'THESIS','thesisId',['thesisName']);//function buildRel(btn,tn,fn_id,fns){  ['A.entity2']=tn;
		    }},
		    { text: '查看PDF文件',
	   			//iconCls: 'plugin_add',
			   handler : function(btn){
		 	   	   var ui=btn.ui;
			   	   var sels=ui.grid.getSelections();
				   if(!sels) return;
				   var selid="";
				   for(var i=0; i<sels.length; i++){
					   var o = sels[i].obj;
					   selid = selid + o.items.map['thesisId']+'';
				   }
				   var url = Bat.Host+"/files/common/thesis/thesis.html?thesisid="+selid+"&catalog_id=0";
				   window.open(url,'_blank');
				   return false;
      	 	}}]
	},
    edit:{
  	    dlg:{width:600,height:380,title:'论文详细信息',titlefunc:function(robj){
		    return '论文详细['+robj.items.map['thesisId']+']';
	    }
	},   	
   	tab:[
   		 {title:"论文详细信息一",fset:[{legend:" ",props:["thesisId","thesisName","isdel","repeatid","pageFrom","chapterNum","thesisClass","thesisType","author","firstauthor","thesisSource","publishHouse","provider"]}]},
   		 {title:"论文详细信息二",fset:[{legend:" ",props:["publishDate","handleMode","wordNum","pageNum","registerMan","registerTime","registerCTime","handler"]}]},
   		 {title:"论文详细信息三",fset:[{legend:" ",props:["handleTime","handleCTime","collateMan","collateTime","collateCTime","confirmMan","confirmTime"]}]},
   		 {title:"论文详细信息四",fset:[{legend:" ",props:["confirmFlag","returnTime","returnReceiver","language","transFlag","pdfFile","pdfidxFile","thesisSort","thesisLabel","iscommend","era","translator","authormode","haverel","relinfo"]}]},   		 
   		 {title:"论文专著内容",fset:[{legend:" ",props:["content"]}]},
   		 {title:"论文来源备注",fset:[{legend:" ",props:["sourceRem"]}]}
   	]}
  },
  'rel_catalog_thesis':{
   req:{"map":{"psMap":{"map":{"rownum":200,"pss":[[
   	"id","entity1","id1","entity2","id2","ord"
   ],["thesisId","thesisName","chapterNum","pageFrom","confirmFlag","firstauthor","author"]],   
   "cns":["dao.hb.Rel","dao.hb.Thesis"],"hql":"","start":0},"javaClass":"java.util.HashMap"},"SN":"RelHandle"},"javaClass":"java.util.HashMap"},
   //      	var hql="from dao.hb.Rel A , dao.hb.Thesis B  where A.id2=B.thesisId  and A.entity2='THESIS' and A.entity1='THESIS_CATALOG' " +
		        			//" and A.id1="+(robj.items.map['catalogId']||robj.items.map['B.catalogId']||0)+"";
   defautdef:{
       editor:"TextField"
   },
   propdef:{ 
   	    "A.id":{
	 		display:'id'	 	
	 	},  
   	    "A.entity1":{
	 		display:'期刊表名'
	 	},
   	    "A.id1":{
	 		display:'论文期刊id'
	 	},	 
   	    "A.entity2":{
	 		display:'论文表名'
	 	},	
   	    "A.id2":{
	 		display:'论文专著编号',
	       cfg:{
		   		  readOnly:false	   		 		 
		   }	 		
	 	},	 	
   	    "A.ord":{
	 		display:'排序',
	       cfg:{
		   		  readOnly:false	   		 		 
		   }	 		
	 	},	 	
   	    "B.thesisId":{
	 		display:'论文专著编号',
	       cfg:{
		   		  readOnly:false	   		 		 
		   }	 		
	 	},
	 	"B.thesisName":{
	 		display:'论文专著名称'
	 	},
	 	"B.pageFrom":{
	 		display:'论文首页页码'
	 	} ,
	 	"B.chapterNum":{
	 		display:'期刊章节'
	 	} ,
	 	"B.confirmFlag":{
	 		display:'确认标志'
	 	},
		"B.author":{
	 		display:'作者'
	 	},
		"B.firstauthor":{
	 		display:'第一作者'
	 	}   
	 	
    },
    grid:{
		 page:true,
		 hide:["A.id","A.entity1","","A.id1","A.entity2","B.thesisId"],
		 //hide:["thesisSource","publishHouse","content","sourceRem","handleMode","wordNum","pageNum","registerMan","registerTime","registerCTime","handler",
	       //    "handleTime","handleCTime","collateMan","collateTime","collateCTime","confirmMan","confirmTime",
	         //  "confirmFlag","returnTime","returnReceiver","language","transFlag","pdfFile","pdfidxFile"
         //],
		 btns:[{
	   		text: '增加并关联',
	   		iconCls: 'plugin_add',
			handler : function(btn){
		    	addRel(btn,'THESIS');
		    }
		 },'删除','保存']
	},
    edit:{
  	    dlg:{width:600,height:380,title:'论文详细信息',titlefunc:function(robj){
		    return '论文详细['+robj.items.map['B.thesisId']+']';
	    }
	},   	
   	tab:[

   	]}
  },
  'dao.hb.Thesis_rel':{
   req:{"map":{"psMap":{"map":{"rownum":5,"pss":[[
   	"id","entity1","id1","entity2","id2","ord"
   ],["thesisName","chapterNum","pageFrom","confirmFlag"]],   
   "cns":["dao.hb.Rel","dao.hb.Thesis"],"hql":"","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   //      	var hql="from dao.hb.Rel A , dao.hb.Thesis B  where A.id2=B.thesisId  and A.entity2='THESIS' and A.entity1='THESIS_CATALOG' " +
		        			//" and A.id1="+(robj.items.map['catalogId']||robj.items.map['B.catalogId']||0)+"";
   defautdef:{
       editor:"TextField",
       cfg:{
	   		  readOnly:true	   		 		 
	   }
   },
   propdef:{ 
   	    "A.id":{
	 		display:'id'	 	
	 	},  
   	    "A.entity1":{
	 		display:'期刊表名'
	 	},
   	    "A.id1":{
	 		display:'论文期刊id'
	 	},	 
   	    "A.entity2":{
	 		display:'论文表名'
	 	},	
   	    "A.id2":{
	 		display:'论文专著编号'
	 	},	 	
   	    "A.ord":{
	 		display:'排序',
	       cfg:{
		   		  readOnly:false	   		 		 
		   }	 		
	 	},	 	
   	    "B.thesisId":{
	 		display:'论文专著编号'
	 	},
	 	"B.thesisName":{
	 		display:'论文专著名称'
	 	},
	 	"B.pageFrom":{
	 		display:'论文首页页码'
	 	} ,
	 	"B.chapterNum":{
	 		display:'期刊章节'
	 	} ,
	 	"B.confirmFlag":{
	 		display:'确认标志'
	 	}  	
	 	
    },
    grid:{
		 page:true,
		 hide:["A.id","A.entity1","","A.id1","A.entity2",""],
		 //hide:["thesisSource","publishHouse","content","sourceRem","handleMode","wordNum","pageNum","registerMan","registerTime","registerCTime","handler",
	       //    "handleTime","handleCTime","collateMan","collateTime","collateCTime","confirmMan","confirmTime",
	         //  "confirmFlag","returnTime","returnReceiver","language","transFlag","pdfFile","pdfidxFile"
         //],
		 btns:['删除','保存']
	},
    edit:{
  	    dlg:{width:600,height:380,title:'论文详细信息',titlefunc:function(robj){
		    return '论文详细['+robj.items.map['B.thesisId']+']';
	    }
	},   	
   	tab:[

   	]}
  },
  'dao.hb.ThesisCatalog':{
   req:{"map":{"psMap":{"map":{"rownum":15,"pss":[[
   	"catalogId","catalogName","catalogAuther","catalogSource","publishHouse","publishDate","wordNum","pageNum","lastUpdate","confirmFlag"
   ]],
   //"cns":["dao.hb.Thesis"],"hql":"from dao.hb.Thesis ","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   "cns":["dao.hb.ThesisCatalog"],"hql":"from dao.hb.ThesisCatalog order by catalogSource,publishDate,catalogId desc ","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
       editor:"TextField"
   },
   propdef:{ 	
   	    catalogId:{
	 		display:'论文期刊id',
			cfg:{
				readOnly:true
			}
	 	},
	 	catalogName:{
	 		display:'论文期刊描述'
	 	},
	 	catalogAuther:{
	 		display:'论文期刊名称'
	 	},	 		 
	 	catalogSource:{
	 		display:'来源'
	 	},
	   	publishHouse:{
	       display:"出版社"
	   	},
	   	publishDate:{
	       display:"日期"
	   	},
	   	wordNum:{
	       display:"字数"
	   	},	   	
	   	pageNum:{
	       display:"页数"
	   	},	   	
	   	confirmFlag:{
	       display:"确认(有pdf)"
	   	}  	   
    },
   relviews:[{
        titlefunc:function(robj){
           return '期刊<'+robj.items.map['catalogId']+'>目录';
        },
        v1:{vn:'rel_catalog_thesis',filterfunc:function(robj,ui){
			var cn = robj.cns[0];
			var bWF = (cn ==Bat.gvs.AVENSCN);
			var hql;
			if(bWF)
	  	        hql="from dao.hb.Rel A , dao.hb.Thesis B  where A.id2=B.thesisId  and A.entity2='THESIS' and A.entity1='THESIS_CATALOG' " +
        			" and A.id1="+(robj.items.map['A.docid']||robj.items.map['B.catalogId'])+" order by A.ord";
	  	    else
	  	        hql="from dao.hb.Rel A , dao.hb.Thesis B  where A.id2=B.thesisId  and A.entity2='THESIS' and A.entity1='THESIS_CATALOG' " +
        			" and A.id1="+(robj.items.map['catalogId']||0)+" order by A.ord";
			ui.req.map.psMap.map.hql = hql;
			ui.hql = hql;
        }},
        v2:{vn:''},
        title: '期刊目录'
	  },{
        titlefunc:function(robj){
           return '期刊<'+robj.items.map['catalogId']+'>相关论文';
        },
        v1:{vn:'dao.hb.Thesis_rel',filterfunc:function(robj,ui){
			var cn = robj.cns[0];
			var bWF = (cn ==Bat.gvs.AVENSCN);
			var hql;
			if(bWF)
	  	        hql="from dao.hb.Rel A , dao.hb.Thesis B  where A.id2=B.thesisId  and A.entity2='THESIS' and A.entity1='THESIS_CATALOG' " +
        			" and A.id1="+(robj.items.map['A.docid']||robj.items.map['B.catalogId'])+" order by A.ord";
	  	    else
	  	        hql="from dao.hb.Rel A , dao.hb.Thesis B  where A.id2=B.thesisId  and A.entity2='THESIS' and A.entity1='THESIS_CATALOG' " +
        			" and A.id1="+(robj.items.map['catalogId']||0)+" order by A.ord";
			ui.req.map.psMap.map.hql = hql;
			ui.hql = hql;
        }},
        v2:{vn:'dao.hb.Thesis',
	        vfunc : function(vw) {
				var btns = ['检索', '排序', '刷新'];
				btns[btns.length] = vw.grid.btns[7];
				vw.grid.btns = btns;
				vw.req.map.psMap.map.rownum=5;
			}
        },
        title: '相关论文'
	  }, {
			titlefunc : function(robj) {
				return '期刊<' + robj.items.map['id'] + '>相关影像';
			},
			v1 : {
				vn : 'rel_subject_image',
				filterfunc : function(robj, ui) {
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
						hql = " from Rel A , Image B where B.imageId=A.id2 and A.entity1='THESIS_CATALOG' and A.entity2='IMAGE' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
						hql = " from Rel A , Image B where B.imageId=A.id2 and A.entity1='THESIS_CATALOG' and A.entity2='IMAGE' and A.id1="
							+ (robj.items.map['catalogId']||0) + " order by A.ord";
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
				}
			},
			v2 : {
				vn : 'dao.hb.Image',
				vfunc : function(vw) {
					var btns = ['检索', '排序', '刷新'];
					var btns = ['检索', '排序', '刷新'];
					btns[btns.length] = vw.grid.btns[4];
					vw.grid.btns = btns;
					vw.req.map.psMap.map.rownum=5;
				}
			},
			title : '相关影像'
		}
    ],     
    grid:{
		 page:true,
		 hide:['lastUpdate'],
		 hidebtns_objview:[1,2,3,7],		 
		 hidebtns_objmode:[],		 
		 btns:['打开','增加','删除','保存','检索','排序','刷新',{
		 	text:'pdf加工',
		 	cls: 'x-btn-text-icon',
		 	icon: '../img/pdf.gif',
			menu: {
				items:[{
				  text:'完成',
				  icon: '../img/app_clean.gif',
				  handler:function(btn){
				  	pdffinish(btn,true);
				  }
				},{
				  text:'未完成',
				  icon: '../img/act_button_cancel.gif',
				  handler:function(btn){
				  	pdffinish(btn,false);
				  }
				}]
			}
		 }
		]
	},
    edit:{
  	    dlg:{width:600,height:380,title:'论文期刊详细信息',titlefunc:function(robj){
		    return '论文期刊详细['+robj.items.map['catalogId']+']';
	    }
	},
	 tab:[
   		 {title:"论文期刊详细信息一",fset:[{legend:" ",props:["catalogId","catalogName","catalogAuther","catalogSource","publishHouse","publishDate","wordNum","pageNum"]}]}
   	 ]
	}
  },  
  'dao.hb.Subject':{
   req:{"map":{"psMap":{"map":{"rownum":15,"pss":[[
   	"id","name","type","begintm","endtm","location","ord","description","homepage","tickets","reldocid","nameUk","typeUk","locationUk","ordUk","descriptionUk","homepageUk","isout","ticketsuk","reldociduk","subtype","tpcloseendtm","tpclosebgtm","tpclosereason","lastUpdate","tpclosetag"
   ]],
   "cns":["dao.hb.Subject"],"hql":"from dao.hb.Subject order by id desc","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
       editor:"TextField"
   },
   propdef:{ 	
   	    id:{
	 		display:'编号'
	 	},
	 	name:{
	 		display:'专题名'
	 	},
	 	type:{
	 		display:'类型'
	 	},	 		 
	 	begintm:{
	 		display:'起始时间',
	 		editor:'DateField',
			renderer:function(val){
				if(val!=null&&val.time){
					return renderDate(val);
				}else{
					return Ext.util.Format.date(val,"Y-m-d");
				}
			},
			cfg:{
				readOnly:true,
				format:'Y-m-d'					
			}		   
	 	},
	   	endtm:{
	       display:"结束时间",
	 	   editor:'DateField',
           renderer:function(val){
		      return renderDate(val);
		   }      
	   	},
	   	location:{
	       display:"地点"
	   	},
	   	ord:{
	       display:"排序"
	   	},	   	
	   	homepage:{
	       display:"首页"
	   	},	   	
	   	description:{
	       display:"介绍",
	       editor:"HtmlEditor",
	       cfg:{	   		  
			  hideLabel:true,
	   		  width:600,
	   		  height:200
	   	   }
	   	},	   	
	   	isout:{
	       display:"赴外展览标志",
	   	    renderer:function(val){
	   			var dtxt ={'0':'否','1':'是'};
	   			return dtxt[val];	
	   	    },
	   	    editor:'ComboBox',
	        cfg:{
	       	store:new Ext.data.SimpleStore({
		        fields: ['txt', 'val'],
		        data : [['否','0'],['是','1']] 
	        }),
	        displayField:'txt',
	        valueField:'val',
	        typeAhead: true,
	        mode: 'local',
	        triggerAction: 'all',
	        emptyText:'...',
	        selectOnFocus:true
	        }		       
	   	},	   	
	   	tickets:{
	       display:"票价"
	   	},	   	
	   	reldocid:{
	       display:"专题前言文稿id"
	   	},
	   	ticketsuk:{
	       display:"英文票价"
	   	},	   	
	   	reldociduk:{
	       display:"英文专题前言文稿id"
	   	},	   	
	 	nameUk:{
	 		display:'英文专题名(提示:&lt;i&gt;斜体&lt;/i&gt;)'
	 	},
	 	typeUk:{
	 		display:'英文类型'
	 	},	
	   	locationUk:{
	       display:"英文地点"
	   	},
	   	ordUk:{
	       display:"英文排序"
	   	},	
	   	homepageUk:{
	       display:"英文首页"
	   	},	   	
	   	descriptionUk:{
	       display:"英文介绍",
	      editor:"HtmlEditor",
	       cfg:{	   		  
			  hideLabel:true,
	   		  width:600,
	   		  height:200
	   	   }
	   	},	   	
	   	subtype:{
	       display:"细分类",
	       editor :'TreeField',
	       cfg:{
	              	 width:350,
	              	 text:'.....',
	            	 fieldLabel:'树形下拉',
	            	 listHeight:250,
	            	 listWidth:250,
	            	 checkModel:'multiple',
	            	 selectValueModel:'all',
	            	 returnData:'includeParent',
	            	// valueField:'id',
		   		    dataUrl:'/cc/servlet/JSonBaseServlet?',
		   		    baseParams:{mode:'TREE',hql:' ',tablename:'dao.hb.BaseExhibitiontype',fieldnames:'id,name,parentid',filter:" order by parentid"
		   		    }
	              }
	   	},	   	
	   	tpcloseendtm:{
	       display:"临时关闭终止时间",
	       editor:"DateField",
			    renderer: function (val) {
			    	return renderDate(val);
			    },
				cfg:{
					readOnly:true,
					type: 'date',
					format:'Y-m-d', altFormats:'Y-m-d'			
				}
	   	},	   	
	   	tpclosebgtm:{
	       display:"临时关闭起始时间",
	       renderer:function(val){
					if(val!=null&&val.time){
						return renderDate(val);
					}else{
						return Ext.util.Format.date(val,"Y-m-d");
					}
				},
				editor:"DateField",
				cfg:{
					readOnly:true,
					format:'Y-m-d'
					
				}
	   	},	   	
	   	tpclosereason:{
	       display:"临时关闭原因"
	   	},	   	
	   	tpclosetag:{
	       display:"临时关闭标志",
	       editor : 'ComboBox',
			cfg : {
				store : new Ext.data.SimpleStore({
					fields : ['txt', 'val'],
					data : [['关闭', '1'], ['开放', '0']]
				}),
				displayField : 'txt',
				valueField : 'val',
				typeAhead : true,
				mode : 'local',
				triggerAction : 'all',
				emptyText : '...',
				selectOnFocus : true
			},
	       
	 		renderer:function(val){
	 			if(val=="1"){
	 				return "关闭";
	 			}else{
	 				return "开放";
	 			}
	 		}
	   	}       	
    },
   relviews:[{
        titlefunc:function(robj){
           return '专题<'+robj.items.map['id']+'>相关文稿';
        },
	  v1:{vn:'rel_rarity_doc',filterfunc:function(robj,ui){
			var cn = robj.cns[0];
			var bWF = (cn ==Bat.gvs.AVENSCN);
			var hql;
			if(bWF)
			 	hql = " from Rel A , Doc B where B.id=A.id2 and A.entity1='SUBJECT' and A.entity2='DOC' and A.id1="
					+ (robj.items.map['A.docid']) + " order by A.ord";
			else
			 	hql = " from Rel A , Doc B where B.id=A.id2 and A.entity1='SUBJECT' and A.entity2='DOC' and A.id1="
					+ (robj.items.map['id'] || 0) + " order by A.ord";
			ui.req.map.psMap.map.hql = hql;
			ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.Doc',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
        title: '相关文稿'
	  } ,{
	  titlefunc:function(robj){
	     return '关联>>相关礼品';
   	  },
	  v1:{vn:'rel_doc_gift',filterfunc:function(robj,ui){
		var cn = robj.cns[0];
		var bWF = (cn ==Bat.gvs.AVENSCN);
		var hql;
		if(bWF)
		 	hql = " from Rel A , CeGift B where B.id=A.id2 and A.entity1='SUBJECT' and A.entity2='CE_GIFT' and A.id1="
				+ (robj.items.map['A.docid'])+" order by A.ord";
		else
		 	hql = " from Rel A , CeGift B where B.id=A.id2 and A.entity1='SUBJECT' and A.entity2='CE_GIFT' and A.id1="
				+ (robj.items.map['id'] || 0)+" order by A.ord";
		ui.req.map.psMap.map.hql = hql;
		ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.CeGift',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
	  title: '相关礼品'
      }, {
			titlefunc : function(robj) {
				return '专题<' + robj.items.map['id'] + '>相关附件';
			},
			v1 : {
				vn : 'rel_subject_attach',
				filterfunc : function(robj, ui) {
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
						hql = " from Rel A , CeAttachment B where B.id=A.id2 and A.entity1='SUBJECT' and A.entity2='CE_ATTACHMENT' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
						hql = " from Rel A , CeAttachment B where B.id=A.id2 and A.entity1='SUBJECT' and A.entity2='CE_ATTACHMENT' and A.id1="
							+ (robj.items.map['id']||0) + " order by A.ord";
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
				}
			},
			v2 : {
				vn : 'dao.hb.CeAttachment',
				vfunc : function(vw) {
					var btns = ['检索', '排序', '刷新'];
					btns[btns.length] = vw.grid.btns[7];//wjh
					vw.grid.btns = btns;
					vw.req.map.psMap.map.rownum=5;
				}
			},
			title : '相关附件'
		} ],     
    grid:{
		 page:true,
		 hide:['lastUpdate'],
		 hidebtns_objview:[1,2,3,7,8],		 
		 hidebtns_objmode:[7],		 
		 btns:['打开','增加','删除','保存','检索','排序','刷新',{
	   		text: '关联专题',
	   		iconCls: 'plugin_add',
			handler : function(btn){
		    	buildRel(btn,'SUBJECT','id',['name']);
		    }},{
		    text:'json',
	   		iconCls: 'plugin_add',
			handler : function(btn){
		    	var sels=btn.ui.grid.getSelections();
		    	if(sels.length!=1){
		    		Ext.MessageBox.alert("操作提示","请选择一个专题!");
		    		return;
		    	}
		    	var sd = sels[0].data;
				Ext.Msg.prompt('输出专题['+sd.id+']', '	请输入导出参数[空则取默认]:', function(btn, text){
				 if (btn == 'ok'){
			       Ext.MessageBox.show({
			           msg: '正在生成json, 请稍候...',
			           progressText: '处理中...',
			           width:300,
			           wait:true,
			           waitConfig: {interval:200},
			           icon: Ext.MessageBox.INFO
			       });
					
			        // process text value and close...
			   		var req={"map":{"psMap":{map:{method:'A',sid:sels[0].data.id,para:text}
			   			,"javaClass":"java.util.HashMap"},"SN":"JSonHandle"},"javaClass":"java.util.HashMap"};
		        	jsonrpc.BH.handle(function(data,ex){
		        		if(ex){
		        			Ext.MessageBox.alert("json输出异常",ex.message);
		        		}else{
		        			Ext.MessageBox.alert('json输出结果',data);
		        		}
		        	},[req]);  
				   }
				});
			}
		 }]
	},
    edit:{
  	    dlg:{width:600,height:380,title:'详细信息',titlefunc:function(robj){
		    return '专题详细['+robj.items.map['id']+']';
	    }
	},
	 tab:[
   		 {title:"详细信息1",fset:[{legend:" ",props:["id","name","type","begintm","endtm","location","ord"]}]},
   		 {title:"详细信息2",fset:[{legend:" ",props:["homepage","isout","tickets","reldocid","subtype","tpclosebgtm","tpcloseendtm","tpclosereason","tpclosetag","confirmFlag"]}]},
   		 {title:"介绍",fset:[{legend:" ",props:["description"]}]},
   		 {title:"英文详细信息1",fset:[{legend:" ",props:["nameUk","typeUk","locationUk","ordUk","descriptionUk"]}]},
   		 {title:"英文详细信息2",fset:[{legend:" ",props:["homepageUk","ticketsuk","reldociduk"]}]},
   		 {title:"英文介绍",fset:[{legend:" ",props:["descriptionUk"]}]}
   	 ]
	}
  },  

  'dao.hb.Research':{
   req:{"map":{"psMap":{"map":{"rownum":15,"pss":[[
   	"id","title","type","principal","tmCreate","status","production","publishHouse","generateDate","lastUpdate"
   ]],
   "cns":["dao.hb.Research"],"hql":"from dao.hb.Research order by id desc","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
       editor:"TextField"
   },
   propdef:{ 	
   	    id:{
	 		display:'编号'
	 	},
	 	title:{
	 		display:'名称'
	 	},
	 	type:{
	 		display:'方式',
			editor : 'ComboBox',
			cfg : {			
				store : new Ext.data.SimpleStore({
					fields : ['txt', 'val'],
					data : [['小组', '小组'], ['个人', '个人']]
				}),
				displayField : 'txt',
				valueField : 'val',
				typeAhead : true,
				mode : 'local',
				triggerAction : 'all',
				emptyText : '',
				selectOnFocus : true
			}				
	 	},	 		 
	 	principal:{
	 		display:'负责人'
	 	},	 		 
	 	tmCreate:{
	 		display:'立项时间'
	 	},
		lastUpdate : {
			display : '最近更新',
			renderer : function(val) {
				return renderDate(val);
			},
			cfg:{
				readOnly:true
			}
		},
	   	status:{
	       display:"结项情况",
			editor : 'ComboBox',
			cfg : {			
				store : new Ext.data.SimpleStore({
					fields : ['txt', 'val'],
					data : [['已结项', '已结项'], ['未结项', '未结项']]
				}),
				displayField : 'txt',
				valueField : 'val',
				typeAhead : true,
				mode : 'local',
				triggerAction : 'all',
				emptyText : '',
				selectOnFocus : true
			}				
	   	},
	   	production:{
	       display:"成果名称"
	   	},	   	
	   	publishHouse:{
	       display:"刊物或出版社"
	   	},	   	
	   	generateDate:{
	       display:"发表或出版年月"
	   	}	   
    },
   relviews:[{
	  titlefunc:function(robj){
	     return '关联>>相关论文';
   	  },
	  v1:{vn:'rel_rarity_thesis',filterfunc:function(robj,ui){
		var cn = robj.cns[0];
		var bWF = (cn ==Bat.gvs.AVENSCN);
		var hql;
		if(bWF)
		 	hql = " from Rel A , Thesis B where B.thesisId=A.id2 and A.entity1='RESEARCH' and A.entity2='THESIS' and A.id1="
				+ (robj.items.map['A.docid']) + " order by A.ord";
		else
		 	hql = " from Rel A , Thesis B where B.thesisId=A.id2 and A.entity1='RESEARCH' and A.entity2='THESIS' and A.id1="
				+ (robj.items.map['id'] || 0) + " order by A.ord";
		ui.req.map.psMap.map.hql = hql;
		ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.Thesis',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
	  title: '相关论文'
      },{
	  titlefunc:function(robj){
	     return '关联>>相关人物';
   	  },
	  v1:{vn:'rel_doc_figure',filterfunc:function(robj,ui){
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
					 	hql = " from Rel A , Figure B where B.id=A.id2 and A.entity1='RESEARCH' and A.entity2='FIGURE' and A.id1="
							+ (robj.items.map['A.docid'])+" order by A.ord";
					else
					 	hql = " from Rel A , Figure B where B.id=A.id2 and A.entity1='RESEARCH' and A.entity2='FIGURE' and A.id1="
							+ (robj.items.map['id'] || 0)+" order by A.ord";
	   				ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
	  }},
	  v2:{vn:'dao.hb.Figure',vfunc:function(vw){
        	var btns = ['检索','排序','刷新'];
        	btns[btns.length]=vw.grid.btns[7];
        	vw.grid.btns=btns;
		  	vw.req.map.psMap.map.rownum=5;
	  	}
	  },
	  title: '相关人物'
      }],     
    grid:{
		 page:true,
		 hidebtns_objview:[1,2,3,7],		 
		 hidebtns_objmode:[],		 
		 btns:['打开','增加','删除','保存','检索','排序','刷新']
	},
    edit:{
  	    dlg:{width:600,height:380,title:'详细信息',titlefunc:function(robj){
		    return '科研课题详细['+robj.items.map['id']+']';
	    }
	},
	 tab:[
   		 {title:"详细信息",fset:[{legend:" ",props:["id","title","type","principal","tmCreate","status","production","publishHouse","generateDate","lastUpdate"]}]}
   	 ]
	}
  },  
  
  
  'dao.hb.AudioVideo':{
   req:{"map":{"psMap":{"map":{"rownum":15,"pss":[["id","name","className","span","summery","url","objkey","modifytext","lastUpdate"]],"cns":["dao.hb.AudioVideo"],"hql":"from dao.hb.AudioVideo order by id desc","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
       editor:"TextField"
   },
   propdef:{ 	
   	    id:{
	 		display:'编号',
			cfg:{
				readOnly:true
			}
	 	},
	 	name:{
	 		display:'名称'
	 	},
	 	className:{
	 		display:'类型'
	 	},	 
	 	span:{
	 		display:'时间长度'
	 	},
	 	summery:{
	 		display:'简短描述',
	 		cfg:{
	 		    width:300
	 		}
	 	},
	   	url:{
	       display:"访问链接",
	       cfg:{
	 	       width:300
	 	   }
	   	},
	   	objkey:{
	       display:"ObjKey"
	   	},
	   	modifytext:{
	       display:"修改后文本",
	       editor:"HtmlEditor",
	       cfg:{	   		  
			  hideLabel:true,
	   		  width:600,
	   		  height:200
	   	   }		       
	   	}
    },
    grid:{
		 page:true,
		 hide:["modifytext"],
		 hidebtns_objmode:[7],
		 hidebtns_objview:[1,2,3,7],		 
		 btns:['打开','增加','删除','保存','检索','排序','刷新',{
	   		text: '关联音视频',
	   		iconCls: 'plugin_add',
			handler : function(btn){
		    	buildRel(btn,'AUDIO_VIDEO','id',['name','url']);
		    }}]
	},   
    edit:{
  	    dlg:{width:600,height:380,title:'音视频详细信息',titlefunc:function(robj){
		    return '音视频详细['+robj.items.map['id']+']';
	    }
	},
   	tab:[
   		 {title:"音视频详细信息一",fset:[{legend:" ",props:["id","name","className","span","summery","url","objkey"]}]},
   		 {title:"修改后文本",fset:[{legend:" ",props:["modifytext"]}]}
   	]}
  },
    'dao.hb.CcPay' : {
    	handles:{general:{'before_put':function(ui){
    		for(var i=0,len=ui.objs.length;i<len;i++){
    			if(ui.objs[i].action=='U'&&ui.objs[i].items.map.rewardFlag=='Y'){
    				ui.objs[i].items.map.rewardCMan=Bat.gvs.wf_un;
    			}
    			if(ui.objs[i].action=='U'&&ui.objs[i].items.map.reGiveFlag=='Y'){//&&ui.objs[i].items.map.reGiveMan==null
    				ui.objs[i].items.map.reGiveMan=Bat.gvs.wf_un;
    			}
    		}
    	}
    	}},
		req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "authorId","title","rewardFlag", "class_", "keyval","workitem", "docNumber", 
						"reward","payFactorNotes","created","rewardCMan","rewardCTime","reGiveFlag","notes",
						"reGiveMan","reGiveTime"]],
						"cns" : ["dao.hb.CcPay"],
						"hql" : "from dao.hb.CcPay where reGiveFlag='N' order by id desc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField",
			cfg:{readOnly:true}
		},
		propdef : {
			id : {
				display : '稿酬id',
				cfg:{
					readOnly:true
				}
			},
			authorId : {
				display : '作者信息',
				editor :'TreeField',				
				cfg:{
					text:'.....',
			    	fieldLabel:'树形下拉',
			    	listHeight:250,
			    	listWidth:500,
			    	 //valueField:'id',   //wjh
			    	valueField:'hiddenValue', 
			    	trimValue1:'Y',
			    	displayField:'text',
			    	checkModel:'multiple',
				    dataUrl:'/cc/servlet/JSonBaseServlet?',
				    baseParams:{mode:'TREEAWAI',hql:'',haveHiddenValue:'Y',haveOrg:'N',tablename:'',fieldnames:'id,name,parentid',filter:" order by name"},				
					
					readOnly:false
				},
				renderer : function(val){
						return formateAuthorId(val);
				}
			},
			title : {
				display : '标题',
				cfg:{
					readOnly:false
				}
			},
//			authorTitle : {
//				display : '作者职称',
//				editor : 'ComboBox',
//		 		cfg:{
//		 		   listWidth:100,
//		 		   width:100,
//			       store:getStore({hql:"select id,name from dao.hb.Base where type='title'"}),
//			        displayField:'name',
//			        valueField:'name',
//			        typeAhead: true,
//			        triggerAction: 'all',
//			        emptyText:'...',
//			        selectOnFocus:true
//		        },
//				cfg:{
//					readOnly:false
//				}
//			},
			class_ : {
				display : '对象分类',
				renderer : function(val) {				
					var dtxt = {
						'dao.hb.Doc':'文稿',
						'dao.hb.Lemma'  :'词条',
						'dao.hb.Relic'  :'文物',
						'dao.hb.Image'  :'影像',
						'dao.hb.Building':'古建',
						'dao.hb.Figure':'人物',
						'dao.hb.Book':'图书',
						'dao.hb.Thesis'  :'论文',
						'dao.hb.ThesisCatalog'  :'论文期刊',
						'dao.hb.Subject'  :'专题',
						'dao.hb.AudioVideo'  :'音视频',
						'dao.hb.Contribution'  :'捐献',
						'dao.hb.CeGift'  :'小礼品',
						'dao.hb.Research'  :'科研课题',
						'dao.hb.CeAttachment'  :'附件'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [
							['文稿', 'dao.hb.Doc'], 
							['词条', 'dao.hb.Lemma'],
							['文物', 'dao.hb.Relic'],
							['影像', 'dao.hb.Image'],
							['古建', 'dao.hb.Building'],
							['人物', 'dao.hb.Figure'],
							['图书', 'dao.hb.Book'],
							['论文', 'dao.hb.Thesis'],
							['论文期刊', 'dao.hb.ThesisCatalog'],
							['专题', 'dao.hb.Subject'],
							['音视频', 'dao.hb.AudioVideo'],
							['捐献', 'dao.hb.Contribution'],
							['小礼品', 'dao.hb.CeGift'],
							['科研课题', 'dao.hb.Research'],
							['附件', 'dao.hb.CeAttachment']
						]
					}),
					displayField : 'txt',
					readOnly:true,
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true
				}								
			},
			keyval : {
				display : '对象编号',
				cfg:{
					readOnly:true
				}
			},
			workitem : {
				display : "活动",
				renderer : function(val) {				
					var dtxt = {
						'djr'  :'文稿登记',
						'szjgr':'数字加工',
						'csbjr':'初审编辑',
						'ysr'  :'一审',
						'esr'  :'二审',
						'zsr'  :'终审',
						'wgfyr':'文稿翻译',
						'wwscr':'外文审查',
						'wwxdr':'外文校对',
						'wwqrr':'外文确认',
						'wgqrr':'文稿确认'
					};
					return dtxt[val];
				},
				cfg:{
					readOnly:true
				}
			},
			docNumber : {
				display : "字数",
				cfg:{
					readOnly:false
				}
			},
			payFactorNotes : {
				display : "稿酬计算说明",
				editor : 'TextArea',
				cfg:{
					readOnly:true,
					width:300
				}
			},
			reward : {
				display : "稿费(元)",
				renderer : function(val) {				
                    if(val!=null){
                    	return val//.toFixed(2);
                    }
                    return val;
				},
				cfg:{
					readOnly:false
				}
			},			
			created : {
				display : "创建时间",
				editor:'DateField',
				renderer:function(val){
					if(val!=null&&val.time){
						return renderDate(val);
					}else{
						return Ext.util.Format.date(val,"Y-m-d");
					}
				},
				cfg:{
					readOnly:true
				}
			},			
			rewardFlag : {
				display : "稿费确认标志",
				renderer : function(val) {
					if(val==null||val==''){
						val='N';
					}
					var dtxt = {
						'Y' : '已确认',
						'N' : '未确认'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {			
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['已确认', 'Y'], ['未确认', 'N']]
					}),
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '未确认',
					selectOnFocus : true
				}				
			},			
			rewardCMan : {
				display : "稿费的确认人",
				cfg:{
					readOnly:true
				}
			},		
			rewardCTime : {
				display : "稿费确认时间",
				editor:'DateField',
				renderer:function(val){
					return formateDate(val);
				},
				cfg:{
					readOnly:true,
					format:'Y-m-d'
				}
			},			
			reGiveFlag : {
				display : "发放标志",
				renderer : function(val) {
					if(val==null||val==''){
						val='N';
					}
					var dtxt = {
						'Y' : '已发放',
						'N' : '未发放'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['已发放', 'Y'], ['未发放', 'N']]
					}),
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '未发放',
					selectOnFocus : true
				}				
			},			
			reGiveMan : {
				display : "发放人",
				cfg:{
					readOnly:true
				}
			},		
			reGiveTime : {
				display : "发放时间",
				editor:'DateField',
				cfg:{
					readOnly:true
				},
				renderer:function(val){
					return formateDate(val);
				}
			},		
			notes : {
				display : "备注"
			}		
		},
		grid : {
			page : true,
			//hide : ["docNumber","rewardCMan","rewardCTime","reGiveFlag","reGiveMan","reGiveTime","lastUpdate","payFactorNotes"],
			hide : ["docNumber","rewardCMan","rewardCTime","reGiveMan","reGiveTime","lastUpdate","payFactorNotes"],
			btns : [
				'打开', '保存', '检索', '排序','刷新',
				getExcelDownLoadBtn({
					text:'稿酬统计表',cls: 'x-btn-text-icon',icon: 'img/page_excel.gif',type:"T"
				}),
				{
					text: '稿酬批量发放',
					cls: 'x-btn-text-icon',
					icon: 'img/page_excel.gif',	
					handler:function(val,e){
						var gcFp = new Ext.form.FormPanel({
        					baseCls: 'x-plain',
        					labelWidth:100,
        					defaultType: 'textfield',
        					modal:true,
       		 				items: [{
            					xtype:'fieldset',
            					autoHeight:true,
            					title: '稿酬确认时间',
             					defaultType: 'textfield',
             					layout:'form',
            					items:[{
            						id:"gcBeginTM",
            						format: 'Y/m/d',  
					            	fieldLabel:'起',
					            	name:'user',
					            	xtype:'datefield',
					            	lazyInit:false,
					            	allowBlank: false,
					            	width:150,
					            	emptyText :'请选择日期',
					            	displayField:'name',
					            	triggerAction:'all',
					            	typeAhead :true
            					},{
            						id:"gcEndTM",
            						format: 'Y/m/d',
					            	fieldLabel:'止',
					            	name:'user',
					            	xtype:'datefield',
					            	lazyInit:false,
					            	allowBlank: false,
					            	width:150,
					            	emptyText :'请选择日期',
					            	displayField:'name',
					            	valueField :'id',
					            	triggerAction:'all',
					            	typeAhead :true
            					}]
			            	},{
            					xtype:'fieldset',
            					id:'gcFFResult',
            					autoHeight:true,
            					title: '稿酬发放结果',
            					style:{color:"#7A140F",fontSize:"12px"},
            					html:"　　本次操作暂未发放稿酬!"
			            	}
			            	]});
        					
						 var gcWin = new Ext.Window({
						    	shadow: false,
						        title: '稿酬批量发放',
						        width: 400,
						        layout: 'form',
						        plain:true,
						        modal:true,
						        bodyStyle:'padding:5px;',
						        buttonAlign:'center',
						        items: gcFp,
								defaultButton:'id_ok',
								buttons:[
									{
							            text: '稿酬发放',
							            handler: function(){
							            	if(typeof Ext.getCmp('gcBeginTM').value=='undefined'||typeof Ext.getCmp('gcEndTM').value=='undefined'){
							            		Ext.Msg.alert("友情提示","请填写起始时间和终止时间!");
							            		return false;
							            	};
							            	var filter=[" where A.rewardCTime between "+
												"to_date('"+Ext.getCmp('gcBeginTM').value+"','yyyy/mm/dd') and "+
												"to_date('"+Ext.getCmp('gcEndTM').value+"','yyyy/mm/dd') "+
												" and (A.reward is not null and A.reward<>0) and A.reGiveFlag='N'"].join("");
											var reqUpdate={"map":{"SN": "DpmHandle","psMap":{map:{method :"U",start:0,
												rownum:20,
												hql :"update CcPay A set A.reGiveFlag='Y',A.reGiveMan='"+Bat.gvs.wf_un+"',A.reGiveTime=to_date('"+
												new Date().dateFormat('Y-m-d')+"','yyyy/mm/dd') "+filter,
												"pss" : [["reGiveFlag"]],
						                    	cns:["dao.hb.CcPay"]
												},"javaClass":"java.util.HashMap"}},"javaClass":"java.util.HashMap"};
											var reqCount={"map":{"SN": "DpmHandle","psMap":{map:{method :"C",start:0,
												rownum:20,
												hql :"from CcPay A"+filter,
												"pss" : [["reGiveFlag"]],
						                    	cns:["dao.hb.CcPay"]
												},"javaClass":"java.util.HashMap"}},"javaClass":"java.util.HashMap"};
											var reqExcel={"map":{"SN": "DpmHandle","psMap":{map:{method :"E",start:0,
												rownum:20,
												loginMan :Bat.gvs.wf_un,
												beginTm:Ext.getCmp('gcBeginTM').value,
												endTm:Ext.getCmp('gcEndTM').value,
												hql :"from CcPay A"+filter,
												"pss" : [["reGiveFlag"]],
						                    	cns:["dao.hb.CcPay"]
												},"javaClass":"java.util.HashMap"}},"javaClass":"java.util.HashMap"};
							            	jsonrpc.BH.handle(function(data,ex){
							            		if(ex){
                    								alert(ex.message);
                   								 }else{
                   								 	var res="";
                   								 	if(data[0]==0&&data[1]==-1){
                   								 		Ext.Msg.alert("稿酬发放结果提示!","不存在已确认但未发放的稿酬记录");
                   								 		return false;
                   								 	}else{
                   								 		res="　　发放成功!<br />　　"+data[0]+"条稿酬记录确认发放,相关记录请在\"稿酬发放历史\"编号["+data[1]+"]中查询!";
                   								 		Ext.Msg.alert("稿酬发放结果提示!",res);
                   								 		Ext.getCmp('gcFFResult').body.dom.innerHTML=res;
                   								 	}
                   								 }
							            	},[reqCount,reqExcel,reqUpdate]);    							            	
							            }
							        }								
								]
						 });
						 gcWin.show();
					}
				},
				{
					text: '稿酬计算',
					cls: 'x-btn-text-icon',
					icon: 'img/htm_import.gif',				
					menu:{
						items:[{text: '依据检索结果计算稿酬',
							    handler : function(btn){
							    	Ext.MessageBox.confirm("提示","批量操作可能耗时很长，确定继续么?",
						       			function(e){
						       				if(e=='yes'){
												var taskFn = function(){
											   		var total=taskFn.taskTotal;
											   	 	var taskReq={"map":{"psMap":{map:{'method':'P','tid':taskFn.taskId},"javaClass":"java.util.HashMap"},"SN":"TaskHandle"},"javaClass":"java.util.HashMap"};
										    		jsonrpc.BH.handle(function(data){
											   	 		var cur = parseInt(data[0][0]);
											   	 		var info = data[0][1];
											   	 		var ui=btn.ui;
											 			if(cur>=0)
											 			taskFn.taskCur=cur;
												 		var cur=taskFn.taskCur;
												        Ext.MessageBox.updateProgress(cur/total, cur + '/'+total);
												        Ext.MessageBox.updateText(info);
												       	if(cur<total){
												       	  	setTimeout(taskFn, 1000);
												       	}
												       	else{
															Ext.MessageBox.hide();
													       	delete taskFn.taskTotal;
													        ui.loadCurpage();
												       	}	   	 		
											   	 	 },[taskReq]); 
										        };
										        var hql=btn.ui.req.map.psMap.map.hql;
											   	var req={"map":{"psMap":{map:{'method':'P',hql:hql,type:'F'},"javaClass":"java.util.HashMap"},"SN":"DpmHandle"},"javaClass":"java.util.HashMap"};
											    jsonrpc.BH.handle(function(rd,ex){
													taskFn.taskId=rd[0][0];
											       	taskFn.taskTotal=parseInt(rd[0][1]);
												    Ext.MessageBox.show({
										           		title: '请稍等...',
										          		msg: '正在处理请求...',
										           		width:300,
										           		progress:true,
										           		closable:false,
										           		animEl: btn.el.dom
				       								});
											 		setTimeout(taskFn, 1000);
												},[req]);						       					
						       				}else{
						       					return false;
						       				}
						       			}
							       	);
							    }
							   },{text: '计算选中记录稿酬',
							    handler : function(btn){
							    	var sels=btn.ui.grid.getSelections();
							    	if(sels.length!=1)Ext.MessageBox.alert("操作提示","请选择一条记录!");
							   		var req={"map":{"psMap":{map:{'method':'G',id:sels[0].data.id,type:'S'},"javaClass":"java.util.HashMap"},"SN":"DpmHandle"},"javaClass":"java.util.HashMap"};
						        	jsonrpc.BH.handle(function(data,ex){
						        		if(ex){
						        			Ext.MessageBox.alert("异常提示",ex.message);
						        		}else{
						        			Ext.MessageBox.alert('稿酬计算',data[0][2]);
						        			setTimeout(function(){btn.ui.loadCurpage()},2000);
						        		}
						        	},[req]);  
							    }
							   }
						]
				    }
				},{
					text: '检索结果批量确认',
					cls: 'x-btn-text-icon',
					icon: 'img/sta.gif',	
				    handler : function(btn){
				    	var hql=btn.ui.req.map.psMap.map.hql;
				    	var req={"map":{"psMap":{map:{'method':'Q',hql:hql,loginMan:Bat.gvs.wf_un},"javaClass":"java.util.HashMap"},"SN":"DpmHandle"},"javaClass":"java.util.HashMap"};
					    Ext.MessageBox.wait("正在对检索结果批量进行<稿酬确认>!");
					    jsonrpc.BH.handle(function(rd,ex){
					    	btn.ui.loadCurpage();
					    	Ext.MessageBox.hide();
						},[req]);
				    }
				}
			]
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '稿酬详细信息',
				titlefunc : function(robj) {
					return '稿酬详细[' + robj.items.map['id'] + ']';
				}
			},
			tab : [
			    {
					title : "稿酬详细信息",
					fset : [{
						legend : " ",
						props : ["id", "authorId", "rewardFlag", "class_", "keyval","workitem", "docNumber","reGiveFlag", 
							     "reward","created","rewardCMan","rewardCTime",
							     "reGiveMan","reGiveTime","payFactorNotes"]
					}]
			    }
		    ]
		}
	},
//稿酬标准start
	  'dao.hb.BasePayfactor' : {
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "expressions", "payFactor", "notes","type","ord"]],
						"cns" : ["dao.hb.BasePayfactor"],
						"hql" : "from dao.hb.BasePayfactor order by id desc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField"
		},
		propdef : {
			id : {
				display : '编号',
				cfg:{
					readOnly:true
				}
			},
			expressions : {
				display : '稿酬计算表达式',
				editor:"TextArea",
				cfg:{
					height:120
				}
			},
			payFactor : {
				display : '稿酬系数(元)'
			},
			notes : {
				display : '稿酬说明',
				editor	: "TextArea"
			},
			type : {
				display : '对象类型',
				renderer : function(val) {				
					var dtxt = {
						'dao.hb.Doc':'文稿',
						'dao.hb.Lemma'  :'词条',
						'dao.hb.Relic'  :'文物',
						'dao.hb.Image'  :'影像',
						'dao.hb.Building':'古建',
						'dao.hb.Figure':'人物',
						'dao.hb.Book':'图书',
						'dao.hb.Thesis'  :'论文',
						'dao.hb.ThesisCatalog'  :'论文期刊',
						'dao.hb.Subject'  :'专题',
						'dao.hb.AudioVideo'  :'音视频',
						'dao.hb.Contribution'  :'捐献',
						'dao.hb.CeGift'  :'小礼品',
						'dao.hb.Research'  :'科研课题',
						'dao.hb.CeAttachment'  :'附件'
					};
					switch(val){
						case null:
							return "所有[排序最后]";
						case "0":
							return "所有[排序优先]";
						default:
							return dtxt[val];
					}
//					if(val==null)return "'所有[排序最后]";
//					else return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [
							['文稿', 'dao.hb.Doc'], 
							['词条', 'dao.hb.Lemma'],
							['文物', 'dao.hb.Relic'],
							['影像', 'dao.hb.Image'],
							['古建', 'dao.hb.Building'],
							['人物', 'dao.hb.Figure'],
							['图书', 'dao.hb.Book'],
							['论文', 'dao.hb.Thesis'],
							['论文期刊', 'dao.hb.ThesisCatalog'],
							['专题', 'dao.hb.Subject'],
							['音视频', 'dao.hb.AudioVideo'],
							['捐献', 'dao.hb.Contribution'],
							['小礼品', 'dao.hb.CeGift'],
							['科研课题', 'dao.hb.Research'],
							['附件', 'dao.hb.CeAttachment'],
							['所有[排序优先]', "0"],
							['所有[排序最后]', null]
						]
					}),
					displayField : 'txt',
					readOnly:true,
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true
				}								
			},
			ord : {
				display : '排序(在相同类型内排序)'
			}
		},
		grid : {
			page : true,
			btns : [
				'打开','增加','删除','保存', '检索', '排序','刷新'
				//,getBtnForExcel({id:'id',obj:"dao.hb.BasePayfactor",item:"[currentPage,all,filter,single]"})
			]
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '稿酬因子详细信息',
				titlefunc : function(robj) {
					return '稿酬因子详细[' + robj.items.map['id'] + ']';
				}
			},
			tab : [
			    {
					title : "稿酬因子详细信息",
					fset : [{
						legend : " ",
						props : ["id", "expressions", "payFactor", "notes"]
					}]
			    }
		    ]
		}
	},
	//稿酬标准start
'dao.hb.CcPayHistory' : {
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "beginTm", "endTm", "confirmMan","path"]],
						"cns" : ["dao.hb.CcPayHistory"],
						"hql" : "from dao.hb.CcPayHistory order by id desc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField",
			cfg:{readOnly:true}
		},
		propdef : {
			id : {
				display : '编号'
			},
			beginTm : {
				display : '稿酬发放起始时间',
				editor:'DateField',
				renderer:function(val){
					return formateDate(val);
				}
			},
			endTm : {
				display : '稿酬发放结束时间',
				editor:'DateField',
				renderer:function(val){
					return formateDate(val);
				}
			},
			confirmMan : {
				display : '稿酬发放确认人 ',
				renderer:function(val){
					return formateAuthorId(val);					
				}
			},
			path : {
				display : '归档表保存路径 ',
				renderer:function(val,style,obj){
					var ds=[];
					if(!obj){
						return val;
					}else{
						return "<a target='_blank' href='/cc/servlet/GcHistoryDownLoad?id="+obj.data.id+"&path="+obj.data.path+"'>"+val+"</a>";
					}
				}
			}
		},
		grid : {
			page : true,
			btns : [
				'查看', '检索', '排序','刷新'
			]
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '稿酬发放历史详细信息',
				titlefunc : function(robj) {
					return '稿酬发放历史记录[' + robj.items.map['id'] + ']';
				}
			},
			tab : [
			    {
					title : "稿酬发放历史详细信息",
					fset : [{
						legend : " ",
						props : ["id", "beginTm", "endTm", "confirmMan","path"]
					}]
			    }
		    ]
		}
	},

//稿酬标准end
	//稿酬发放
    'dao.hb.CcPayff' : {
		req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "authorId", "authorTitle", "class_", "keyval","title","workitem", "docNumber", 
						"reward","created","rewardFlag","rewardCMan","rewardCTime","reGiveFlag",
						"reGiveMan","reGiveTime"]],
						"cns" : ["dao.hb.CcPay"],
						"hql" : "from dao.hb.CcPay where reGiveFlag='Y' and reward is not null order by id desc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField",
			cfg:{readOnly:true}
		},
		propdef : {
			id : {
				display : '稿酬id'
			},
			authorId : {
				display : '作者id',
				renderer:function(val){
					return formateAuthorId(val);				
				}
			},
			authorTitle : {
				display : '作者职称',
				renderer : function(val) {
					var dtxt = {
						'1' : '正研究员',
						'2' : '副研究员 ',
						'3' : '馆员'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['正研究员', '1'], ['副研究员', '2'], ['馆员', '3']]
					}),
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true
				}								
			},
			class_ : {
				display : '对象分类',
				renderer : function(val) {				
					var dtxt = {
						'dao.hb.Doc':'文稿',
						'dao.hb.Lemma'  :'词条',
						'dao.hb.Relic'  :'文物',
						'dao.hb.Image'  :'影像',
						'dao.hb.Building':'古建',
						'dao.hb.Figure':'人物',
						'dao.hb.Book':'图书',
						'dao.hb.Thesis'  :'论文',
						'dao.hb.ThesisCatalog'  :'论文期刊',
						'dao.hb.Subject'  :'专题',
						'dao.hb.AudioVideo'  :'音视频',
						'dao.hb.Contribution'  :'捐献',
						'dao.hb.CeGift'  :'小礼品',
						'dao.hb.Research'  :'科研课题',
						'dao.hb.CeAttachment'  :'附件'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [
							['文稿', 'dao.hb.Doc'], 
							['词条', 'dao.hb.Lemma'],
							['文物', 'dao.hb.Relic'],
							['影像', 'dao.hb.Image'],
							['古建', 'dao.hb.Building'],
							['人物', 'dao.hb.Figure'],
							['图书', 'dao.hb.Book'],
							['论文', 'dao.hb.Thesis'],
							['论文期刊', 'dao.hb.ThesisCatalog'],
							['专题', 'dao.hb.Subject'],
							['音视频', 'dao.hb.AudioVideo'],
							['捐献', 'dao.hb.Contribution'],
							['小礼品', 'dao.hb.CeGift'],
							['科研课题', 'dao.hb.Research'],
							['附件', 'dao.hb.CeAttachment']
						]
					}),
					displayField : 'txt',
					readOnly:true,
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true
				}								
			},
			keyval : {
				display : '文稿主键值'
			},
			title : {
				display : '标题'
			},
			workitem : {
				display : "活动",
				renderer : function(val) {				
					var dtxt = {
						'djr'  :'文稿登记',
						'szjgr':'数字加工',
						'csbjr':'初审编辑',
						'ysr'  :'一审',
						'esr'  :'二审',
						'zsr'  :'终审',
						'wgfyr':'文稿翻译',
						'wwscr':'外文审查',
						'wwxdr':'外文校对',
						'wwqrr':'外文确认',
						'wgqrr':'文稿确认'
					};
					return dtxt[val];
				}
			},
			docNumber : {
				display : "文稿字数"
			},
			reward : {
				display : "稿费",
				renderer : function(val) {				
                    if(val!=null){
                    	return val//.toFixed(2);
                    }
                    return val;
				}
			},			
			created : {
				display : "创建时间",
				editor:'DateField',
				renderer:function(val){
					return formateDate(val);
				}
			},			
			rewardFlag : {
				display : "稿费确认标志",
				renderer : function(val) {
					if(val==null||val==''){
						val='N';
					}
					var dtxt = {
						'Y' : '确认',
						'N' : '未确认'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {			
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['确认', 'Y'], ['未确认', 'N']]
					}),
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '未确认',
					selectOnFocus : true
				}				
			},			
			rewardCMan : {
				display : "稿费的确认人"
			},		
			rewardCTime : {
				display : "稿费确认时间",
				editor:'DateField',
				renderer:function(val){
					return formateDate(val);
				}
			},			
			reGiveFlag : {
				display : "发放标志",
				renderer : function(val) {
					if(val==null||val==''){
						val='N';
					}
					var dtxt = {
						'Y' : '发放',
						'N' : '未发放'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['发放', 'Y'], ['未发放', 'N']]
					}),
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '未发放',
					selectOnFocus : true
				}				
			},			
			reGiveMan : {
				display : "发放人"
			},		
			reGiveTime : {
				display : "发放时间",
				editor:'DateField',
				renderer:function(val){
					return formateDate(val);
				}
			}		
		},
		grid : {
			page : true,
			hide : ["docNumber","rewardFlag","rewardCMan","rewardCTime","reGiveFlag","reGiveMan","reGiveTime"],
			btns : ['打开', '检索', '排序','刷新'
			        ,getExcelDownLoadBtn({
						text:'稿酬明细表',cls: 'x-btn-text-icon',icon: 'img/page_excel.gif',type:"T"
					})]
				//getBtnForExcel({id:'id',obj:"dao.hb.CcPay",item:"[filter,single,currentPage,all]"})]
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '稿酬详细信息',
				titlefunc : function(robj) {
					return '稿酬详细[' + robj.items.map['id'] + ']';
				}
			},
			tab : [
			    {
				title : "稿酬发放信息",
				fset : [{
					legend : " ",
					props : ["id", "authorId", "authorTitle", "class_", "keyval","title","workitem", "docNumber", 
						     "reward","created","rewardFlag","rewardCMan","rewardCTime","reGiveFlag",
						     "reGiveMan","reGiveTime"]
				}
				]}
		    ]
		}
	},

/*老系统稿酬整理 start*/
'dao.hb.ogcdocDes':{
	 req:{"map":{"psMap":{"map":{"pss":[["docId","category","className","objProdarea","docName","author","rewardType","doctextNum","rewardLevel","rewardTxt","reTxtCTime"]],"cns":["dao.hb.DocmanDoc"],"hql":"from dao.hb.DocmanDoc where transFlag='N' and reTxtFlag='Y' order by docId","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
   	 editor:"TextField"
   },
   propdef:{
   	    docId:{
	 		display:'序号',
		 	cfg:{
	   		  readOnly:true
	   	    }
	 	},
	 	category:{
	 		display:'栏目'
	 	},
	 	className:{
	 		display:'类别'
	 	},
	 	objProdarea:{
	 		display:'细分类'
	 	},
	 	docName:{
	 		display:'文稿题目'
	 	},
	 	author:{
	 		display:'撰稿人'
	 	},
	 	rewardType:{
	 		display:'稿酬类型'
	 	},
	 	doctextNum:{
	 		display:'字数'
	 	},
	 	rewardLevel:{
	 		display:'稿酬标准(元)'
	 	},
	 	rewardTxt:{
	 		display:'金额(元)'
	 	}
	 	,reTxtCTime:{
	 		display : '时间',
				editor:"DateField",
			    renderer: function (val) {
			    	return renderDate(val);
			    },
				cfg:{
					readOnly:true,
					type: 'date',
					format:'Y-m-d', altFormats:'Y-m-d'			
				}
	 	}
	 				
   },
   	
	 grid:{
		 page:true,
		 btns:['打开','检索','排序','刷新']
	},   
  edit:{
  	dlg:{width:600,height:360,title:'老系统稿酬详细信息',titlefunc:function(robj){
		return '详细>>老系统稿酬['+robj.items.map['docId']+']';
	}
	},
   	tab:[
   		 {title:"老系统稿酬详细信息",fset:[
   		 	{legend:"必填项",props:["docId","category","className","objProdarea","docName","author","rewardType","doctextNum","rewardLevel","rewardTxt","reTxtCTime"]}]}      	
   	] }
  }, 
 'dao.hb.ogcdocShencha':{
	 req:{"map":{"psMap":{"map":{"pss":[["docId","category","className","docName","author"],["name","docProc","reward"]
	 ],"cns":["dao.hb.DocmanDoc","dao.hb.DocmanDocProcess"],"hql":"from DocmanDoc A,DocmanDocProcess B where A.docId=B.docId and B.docProc in (4,5) and B.type='I' and B.rewardFlag='Y' order by A.docId","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
   	 editor:"TextField"
   },
   propdef:{
   	    "A.docId":{
	 		display:'序号',
		 	cfg:{
	   		  readOnly:true
	   	    }
	 	},
	 	"A.category":{
	 		display:'栏目'
	 	},
	 	"A.className":{
	 		display:'类别'
	 	},
	 	"A.docName":{
	 		display:'文稿题目'
	 	},
	 	"A.author":{
	 		display:'撰稿人'
	 	},
	 	"B.name":{
	 		display:'审查者'
	 	},
	 	"B.docProc":{
	 		display:'稿酬标准(元)'
	 	},
	 	"B.reward":{
	 		display:'金额(元)'
	 	}
   },
   	
	 grid:{
		 page:true,
		 btns:['打开','检索','排序','刷新']
	},   
  edit:{
  	dlg:{width:600,height:360,title:'老系统稿酬详细信息',titlefunc:function(robj){
		return '详细>>老系统稿酬['+robj.items.map['A.docId']+']';
	}
	},
   	tab:[
   		 {title:"老系统稿酬详细信息",fset:[
   		 	{legend:"必填项",props:["A.docId","A.category","A.className","A.docName","A.author","B.name","B.docProc","B.reward"]}]}      	
   	] }
  },
  'dao.hb.ogcdocZhongshen':{
	 req:{"map":{"psMap":{"map":{"pss":[["docId","category","className","docName","author","edit1Man","rewardEdit1","edit2Man","rewardEdit2","rewardEdit1"]],"cns":["dao.hb.DocmanDoc"],"hql":"from dao.hb.DocmanDoc where reEdit1Flag='Y' order by docId","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
   	 editor:"TextField"
   },
   propdef:{
   	    docId:{
	 		display:'序号',
		 	cfg:{
	   		  readOnly:true
	   	    }
	 	},
	 	category:{
	 		display:'栏目'
	 	},
	 	className:{
	 		display:'类别'
	 	},
	 	docName:{
	 		display:'文稿题目'
	 	},
	 	author:{
	 		display:'撰稿人'
	 	},
	 	edit1Man:{
	 		display:'终审'
	 	},
	 	rewardEdit1:{
	 		display:'rewardEdit1'
	 	},
	 	edit2Man:{
	 		display:'终审'
	 	},
	 	rewardEdit2:{
	 		display:'稿酬标准(元)'
	 	},
	 	rewardEdit1:{
	 		display:'金额(元)',
	 		renderer:function(itxt,r,col,l){
				 var obj = col.data;
				 var rewardEdit1_sum = obj.rewardEdit1+obj.rewardEdit2;
				 return rewardEdit1_sum;
			}
	 	}//,
	 	////rewardEdit2:{
	 	//	display:'rewardEdit2'
	 	//}
   },
   	
	 grid:{
		 page:true,
		 btns:['打开','检索','排序','刷新']
	},   
  edit:{
  	dlg:{width:600,height:360,title:'老系统稿酬详细信息',titlefunc:function(robj){
		return '详细>>老系统稿酬['+robj.items.map['docId']+']';
	}
	},
   	tab:[
   		 {title:"老系统稿酬详细信息",fset:[
   		 	{legend:"必填项",props:["docId","category","className","docName","author","edit1Man","rewardEdit1","edit2Man","rewardEdit2","rewardEdit1","rewardEdit2"]}]}      	
   	] }
  }, 
 'dao.hb.ogcdocFanyi':{
	 req:{"map":{"psMap":{"map":{"pss":[["docId","category","className","docName","author","language","transMan","rewardLevel","rewardTxt"]],"cns":["dao.hb.DocmanDoc"],"hql":"from DocmanDoc where reTxtFlag='Y' and transFlag='Y' order by docId","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
   	 editor:"TextField"
   },
   propdef:{
   	    docId:{
	 		display:'序号',
		 	cfg:{
	   		  readOnly:true
	   	    }
	 	},
	 	category:{
	 		display:'栏目'
	 	},
	 	className:{
	 		display:'类别'
	 	},
	 	docName:{
	 		display:'文稿题目'
	 	},
	 	author:{
	 		display:'撰稿人'
	 	},
	 	language:{
	 		display:'翻译语种'
	 	},
	 	transMan:{
	 		display:'翻译者'
	 	},
	 	rewardLevel:{
	 		display:'稿酬标准(元)'
	 	},
	 	rewardTxt:{
	 		display:'金额(元)'
	 	}
   },
   	
	 grid:{
		 page:true,
		 btns:['打开','检索','排序','刷新']
	},   
  edit:{
  	dlg:{width:600,height:360,title:'老系统稿酬详细信息',titlefunc:function(robj){
		return '详细>>老系统稿酬['+robj.items.map['docId']+']';
	}
	},
   	tab:[
   		 {title:"老系统稿酬详细信息",fset:[
   		 	{legend:"必填项",props:["docId","category","className","docName","author","language","transMan","rewardLevel","rewardTxt"]}]}      	
   	] }
  },
  'dao.hb.ogcdocFanyishecha':{
	 req:{"map":{"psMap":{"map":{"pss":[["docId","category","className","docName","author","language","transMan"],["name","docProc","reward"]
	 ],"cns":["dao.hb.DocmanDoc","dao.hb.DocmanDocProcess"],"hql":"from DocmanDoc A,DocmanDocProcess B where A.docId=B.docId and B.docProc=9 and B.type='I' and A.transFlag='Y' and B.rewardFlag='Y' order by A.docId","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
   	 editor:"TextField"
   },
   propdef:{
   	    "A.docId":{
	 		display:'序号',
		 	cfg:{
	   		  readOnly:true
	   	    }
	 	},
	 	"A.category":{
	 		display:'栏目'
	 	},
	 	"A.className":{
	 		display:'类别'
	 	},
	 	"A.docName":{
	 		display:'文稿题目'
	 	},
	 	"A.author":{
	 		display:'撰稿人'
	 	},
	 	"A.language":{
	 		display:'翻译语种'
	 	},
	 	"A.transMan":{
	 		display:'翻译者'
	 	},
	 	"B.name":{
	 		display:'审查者'
	 	},
	 	"B.docProc":{
	 		display:'稿酬标准(元)'
	 	},
	 	"B.reward":{
	 		display:'金额(元)'
	 	}
   },
   	
	 grid:{
		 page:true,
		 btns:['打开','检索','排序','刷新']
	},   
  edit:{
  	dlg:{width:600,height:360,title:'老系统稿酬详细信息',titlefunc:function(robj){
		return '详细>>老系统稿酬['+robj.items.map['A.docId']+']';
	}
	},
   	tab:[
   		 {title:"老系统稿酬详细信息",fset:[
   		 	{legend:"必填项",props:["A.docId","A.category","A.className","A.docName","A.author","A.language","A.transMan","B.name","B.docProc","B.reward"]}]}      	
   	] }
  },
   'dao.hb.ogcThesis':{
	 req:{"map":{"psMap":{"map":{"pss":[["thesisId","thesisName","author","thesisSource","wordNum","rewardLevel","reward"]],"cns":["dao.hb.DocmanThesis"],"hql":"from DocmanThesis where rewardFlag='Y' order by thesisId","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
   	 editor:"TextField"
   },
   propdef:{
   	    thesisId:{
	 		display:'序号',
		 	cfg:{
	   		  readOnly:true
	   	    }
	 	},
	 	thesisName:{
	 		display:'论文名称'
	 	},
	 	author:{
	 		display:'论文作者'
	 	},
	 	thesisSource:{
	 		display:'论文出处'
	 	},
	 	wordNum:{
	 		display:'字数'
	 	},
	 	rewardLevel:{
	 		display:'稿酬标准(元)'
	 	},
	 	reward:{
	 		display:'金额(元)'
	 	}
   },
   	
	 grid:{
		 page:true,
		 btns:['打开','检索','排序','刷新']
	},   
  edit:{
  	dlg:{width:600,height:360,title:'老系统稿酬详细信息',titlefunc:function(robj){
		return '详细>>老系统稿酬['+robj.items.map['thesisId']+']';
	}
	},
   	tab:[
   		 {title:"老系统稿酬详细信息",fset:[
   		 	{legend:"必填项",props:["thesisId","thesisName","author","thesisSource","wordNum","rewardLevel","reward"]}]}      	
   	] }
  },
 'dao.hb.ogcLunwenzhuanzhumulu':{
	 req:{"map":{"psMap":{"map":{"pss":[["docName"],["thesisId","thesisName"],["provider","re","orderId"]//"distinct(C.thesis_id)"
	 ],"cns":["dao.hb.DocmanDoc","dao.hb.DocmanThesis","dao.hb.DocmanRelDocThesis"],"hql":"from DocmanDoc A,DocmanThesis B,DocmanRelDocThesis C where B.thesisId=C.thesisId and A.docId=C.docId and C.reFlag='Y' order by C.thesisId ","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
   	 editor:"TextField"
   },
   propdef:{
	 	"A.docName":{
	 		display:'相关文稿'
	 	},
	 	"B.thesisId":{
	 		display:'论文专著目录名称'
	 	},
	 	"B.thesisName":{
	 		display:'论文专著目录名称'
	 	},
	 	"C.re":{
	 		display:'稿酬标准(元)'
	 	},
	 	"C.orderId":{
	 		display:'金额(元)',
	 		renderer:function(itxt,r,col,l){
				 var obj = col.data;
				 return obj[C.re];
			}
	 	},
	 	"C.provider":{
	 		display:'提供者'
	 	}
   },
   	
	 grid:{
		 page:true,
		 btns:['打开','检索','排序','刷新']
	},   
  edit:{
  	dlg:{width:600,height:360,title:'老系统稿酬详细信息',titlefunc:function(robj){
		return '详细>>老系统稿酬['+robj.items.map['A.docName']+']';
	}
	},
   	tab:[
   		 {title:"老系统稿酬详细信息",fset:[
   		 	{legend:"必填项",props:["A.docName","C.provider","B.thesisId","B.thesisName","C.re","C.orderId"]}]}      	
   	] }
  },
 'dao.hb.ogcImage':{
	 req:{"map":{"psMap":{"map":{"pss":[["imageId","category","objName","imageName","provider","imgColor","number","rewardLevel","reward"]],"cns":["dao.hb.DocmanImage"],"hql":"from DocmanImage where rewardFlag='Y'  order by imageId","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
   	 editor:"TextField"
   },
   propdef:{
   	    imageId:{
	 		display:'序号',
		 	cfg:{
	   		  readOnly:true
	   	    }
	 	},
	 	category:{
	 		display:'栏目'
	 	},
	 	objName:{
	 		display:'影像名称'
	 	},
	 	imageName:{
	 		display:'对象名称'
	 	},
	 	provider:{
	 		display:'提供者'
	 	},
	 	imgColor:{
	 		display:'类型'
	 	},
	 	number:{
	 		display:'张数'
	 	},
	 	rewardLevel:{
	 		display:'稿酬标准(元)'
	 	},
	 	reward:{
	 		display:'金额(元)'
	 	}
   },
   	
	 grid:{
		 page:true,
		 btns:['打开','检索','排序','刷新']
	},   
  edit:{
  	dlg:{width:600,height:360,title:'老系统稿酬详细信息',titlefunc:function(robj){
		return '详细>>老系统稿酬['+robj.items.map['imageId']+']';
	}
	},
   	tab:[
   		 {title:"老系统稿酬详细信息",fset:[
   		 	{legend:"必填项",props:["imageId","category","objName","imageName","provider","imgColor","number","rewardLevel","reward"]}]}      	
   	] }
  },
 'dao.hb.ogcLemma':{
	 req:{"map":{"psMap":{"map":{"pss":[["lemmaId","lemmaName","descriptionAuthor","lemmaNum","re","imageId"]],"cns":["dao.hb.DocmanLemma"],"hql":"from DocmanLemma where reFlag='Y' order by lemmaId","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
   	 editor:"TextField"
   },
   propdef:{
   	    lemmaId:{
	 		display:'序号',
		 	cfg:{
	   		  readOnly:true
	   	    }
	 	},
	 	lemmaName:{
	 		display:'词条名称'
	 	},
	 	descriptionAuthor:{
	 		display:'撰稿人'
	 	},
	 	lemmaNum:{
	 		display:'词条字数'
	 	},
	 	re:{
	 		display:'稿酬标准(元)'
	 	},
	 	imageId:{
	 		display:'金额(元)',	 		
	 		renderer:function(itxt,r,col,l){
				 var obj = col.data;
				 return obj[re];
			}
	 	}
   },
   	
	 grid:{
		 page:true,
		 btns:['打开','检索','排序','刷新']
	},   
  edit:{
  	dlg:{width:600,height:360,title:'老系统稿酬详细信息',titlefunc:function(robj){
		return '详细>>老系统稿酬['+robj.items.map['imageId']+']';
	}
	},
   	tab:[
   		 {title:"老系统稿酬详细信息",fset:[
   		 	{legend:"必填项",props:["lemmaId","lemmaName","descriptionAuthor","lemmaNum","re","imageId"]}]}      	
   	] }
  },
 'dao.hb.ogcPresent':{
	 req:{"map":{"psMap":{"map":{"pss":[["id","presentclass","presentname","author","rewardLevel","rewardSum"]],"cns":["dao.hb.DocmanPresent"],"hql":"from DocmanPresent where rewardFlag='Y' order by id","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
   	 editor:"TextField"
   },
   propdef:{
   	    id:{
	 		display:'序号',
		 	cfg:{
	   		  readOnly:true
	   	    }
	 	},
	 	presentclass:{
	 		display:'礼品分类'
	 	},
	 	presentname:{
	 		display:'礼品名称'
	 	},
	 	author:{
	 		display:'提供者'
	 	},
	 	rewardLevel:{
	 		display:'稿酬标准(元)'
	 	},
	 	rewardSum:{
	 		display:'金额(元)'
	 	}
   },
   	
	 grid:{
		 page:true,
		 btns:['打开','检索','排序','刷新']
	},   
  edit:{
  	dlg:{width:600,height:360,title:'老系统稿酬详细信息',titlefunc:function(robj){
		return '详细>>老系统稿酬['+robj.items.map['id']+']';
	}
	},
   	tab:[
   		 {title:"老系统稿酬详细信息",fset:[
   		 	{legend:"必填项",props:["id","presentclass","presentname","author","rewardLevel","rewardSum"]}]}      	
   	] }
  },
  'dao.hb.ogcCard':{ 
	 req:{"map":{"psMap":{"map":{"pss":[["cardid","classid","cardname","author","rewardLevel","rewardSum"]],"cns":["dao.hb.DocmanCardinf"],"hql":"from DocmanCardinf where rewardFlag='Y'  order by cardid","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
   	 editor:"TextField"
   },
   propdef:{
   	    cardid:{
	 		display:'序号',
		 	cfg:{
	   		  readOnly:true
	   	    }
	 	},
	 	classid:{
	 		display:'贺卡分类'
	 	},
	 	cardname:{
	 		display:'贺卡名称'
	 	},
	 	author:{
	 		display:'提供者'
	 	},
	 	rewardLevel:{
	 		display:'稿酬标准(元)'
	 	},
	 	rewardSum:{
	 		display:'金额(元)'
	 	}
   },
   	
	 grid:{
		 page:true,
		 btns:['打开','检索','排序','刷新']
	},   
  edit:{
  	dlg:{width:600,height:360,title:'老系统稿酬详细信息',titlefunc:function(robj){
		return '详细>>老系统稿酬['+robj.items.map['cardid']+']';
	}
	},
   	tab:[
   		 {title:"老系统稿酬详细信息",fset:[
   		 	{legend:"必填项",props:["cardid","classid","cardname","author","rewardLevel","rewardSum"]}]}      	
   	] }
  },

//评论审核外网
'dao.hb.CeCommentOut':{
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "title", "content","username", "userid","tmRemark","pid","articleid","istop","useridAuditing","status","tmAuditing","remark"]],
						"cns" : ["dao.hb.CeCommentOut"],
						"hql" : "from CeCommentOut order by id desc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField",
			cfg:{
				readOnly:true
			}
		},
		propdef : {
			'id' : {
				display : '编号',
				cfg:{
					readOnly:true
				}
			},
			'userid' : {
				display : '用户编号',
				cfg:{
					readOnly:true
				}
			},
			'username' : {
				display : '用户名',
				cfg:{
					readOnly:true
				}
			},
			'pid' : {
				display : '父评论编号',
				cfg:{
					readOnly:true
				}
			},
			'articleid' : {
				display : '文章编号',
				cfg:{
					readOnly:true
				}
			},
			'useridAuditing' : {
				display : '审查用户编号',
				cfg:{
					readOnly:true
				}
			},
			'ip' : {
				display : '用户ip地址',
				cfg:{
					readOnly:true
				}
			},
			'title' : {
				display : '题名'			
			},
			'content' : {
				editor:'TextArea',
				display : '内容'			
			},
			'remark' : {
				editor:'TextArea',
				display : '审核备注',
				cfg:{
					readOnly:false
				}
			},
			'status' : {
				display : '状态'	,
				renderer : function(val) {				
					var dtxt = {
						'0'  :'待审',
						'1':'禁止',	
						'2':'通过'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					width:100,
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['待审', '0'], ['禁止', '1'], ['通过', '2']]
					}),
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true,
					readOnly:false
				}								
			},
			'istop' : {
				display : '置顶'	,
				renderer : function(val) {				
					var dtxt = {
						'0'  :'否',
						'1':'是'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					width:100,
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['否', '0'], ['是', '1']]
					}),
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true,
					readOnly:false
				}								
			},
			'tmRemark' : {
				display : '建立时间',
			    renderer: function (val) {
			    	return renderDate(val);
			    },
				cfg:{
					readOnly:true
				}
			},
			'tmAuditing' : {
				display : '审查时间',
			    renderer: function (val) {
			    	return renderDate(val);
			    },
				cfg:{
					readOnly:true
				}
			}
		},
		grid : {
			hide:  ['content','remark'],
			page : true,
			btns : ['打开', '增加','保存', '检索', '排序','刷新']
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '详细信息',
				titlefunc : function(robj) {
					return '评论详细[' + robj.items.map['id'] +']';
				}
			},
			tab : [
			    {
					title : "评论详细信息",
					fset : [{
						legend : " ",
						props : ["id", "title", "content", "userid","username","ip","tmRemark","pid","articleid"]
					},{
						legend : " ",
						props : ["useridAuditing","status","istop","tmAuditing","remark"]
					}]
			    }
		    ]
		}	
},

//评论审核内网
'dao.hb.CeComment':{
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "title", "content", "userid","tmRemark","pid","articleid","istop","useridAuditing","status","tmAuditing","remark"]],
						"cns" : ["dao.hb.CeComment"],
						"hql" : "from CeComment A  order by id desc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField"
		},
		propdef : {
			'id' : {
				display : '编号',
				cfg:{
					readOnly:true
				}
			},
			'userid' : {
				display : '用户编号',
				cfg:{
					readOnly:true
				}
			},
			'username' : {
				display : '用户编号',
				cfg:{
					readOnly:true
				}
			},
			'pid' : {
				display : '父评论编号',
				cfg:{
					readOnly:true
				}
			},
			'articleid' : {
				display : '文章编号',
				cfg:{
					readOnly:true
				}
			},
			'useridAuditing' : {
				display : '审查用户编号',
				cfg:{
					readOnly:true
				}
			},
			'ip' : {
				display : '用户ip地址',
				cfg:{
					readOnly:true
				}
			},
			'title' : {
				display : '题名'			
			},
			'content' : {
				editor:'TextArea',
				display : '内容'			
			},
			'remark' : {
				editor:'TextArea',
				display : '审核备注'			
			},
			'status' : {
				display : '状态'	,
				renderer : function(val) {				
					var dtxt = {
						'0'  :'待审',
						'1':'禁止',	
						'2':'通过'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					width:100,
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['待审', '0'], ['禁止', '1'], ['通过', '2']]
					}),
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true
				}								
			},
			'istop' : {
				display : '置顶'	,
				renderer : function(val) {				
					var dtxt = {
						'0'  :'否',
						'1':'是'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					width:100,
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['否', '0'], ['是', '1']]
					}),
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true
				}								
			},
			'tmRemark' : {
				display : '建立时间',
			    renderer: function (val) {
			    	return renderDate(val);
			    },
				cfg:{
					readOnly:true
				}
			},
			'tmAuditing' : {
				display : '审查时间',
			    renderer: function (val) {
			    	return renderDate(val);
			    },
				cfg:{
					readOnly:true
				}
			}
		},
		grid : {
			hide:  ['content','remark'],
			page : true,
			btns : ['打开', '增加','保存', '检索', '排序','刷新']
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '详细信息',
				titlefunc : function(robj) {
					return '评论详细[' + robj.items.map['A.id'] +']';
				}
			},
			tab : [
			    {
					title : "评论详细信息",
					fset : [{
						legend : " ",
						props : ["id", "title", "content", "userid","username","ip","tmRemark","pid","articleid"]
					},{
						legend : " ",
						props : ["useridAuditing","status","istop","tmAuditing","remark"]
					}]
			    }
		    ]
		}	
},
//内网用户管理
'dao.hb.CeUser':{
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "userid","name","usergroup","email","tmRegister","tmLastlogin","status","ip","surname","description","gender","birthday","nationality","countryresidence","lastname","folk","education","phone","isvolunteer","stature","foreignlanguage","resume","experience","servicetime","issubscribenews","langid","ggrsAudit"]],
						"cns" : ["dao.hb.CeUser"],
						"hql" : "from dao.hb.CeUser order by id desc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField",
			cfg:{
					readOnly:true
			}
		},
		propdef : {
			id : {
				display : '编号'
			},
			userid : {
				display : '用户名'		
			},
			password : {
				display : '密码'	
			},
			name : {
				display : '姓名'	
			},		
			usergroup : {
				display : '用户组',
				renderer : function(val) {
					var dtxt = {
						'user' : '普通用户组',
						'ggrs_savant' : '学术研究专家用户组',
						'ggrs_sysmanage' : '学术研究系统管理员组'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['普通用户组', 'user'], ['学术研究专家用户组', 'ggrs_savant'], ['学术研究系统管理员组', 'ggrs_sysmanage']]
					}),
					listHeight:200,
            	    listWidth:150,
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true,
					readOnly:false
				}				
			},	
			email : {
				display : '邮件地址'	
			},	
			tmRegister : {
				display : '注册时间',
				//editor:"DateField",
			    renderer: function (val) {
			    	return renderDate(val);
			    },
				cfg:{
					//type: 'date',
					format:'Y-m-d', altFormats:'Y-m-d',
					readOnly:true
				}	
			},		
			tmLastlogin : {
				display : '最后登录时间',
				//editor:"DateField",
			    renderer: function (val) {
			    	return renderDate(val);
			    },
				cfg:{
					//type: 'date',
					format:'Y-m-d', altFormats:'Y-m-d',
					readOnly:true
				}	
			},			
			status : {
				display : '状态'	,				
				renderer : function(val) {
					var dtxt = {
						0:'未激活',
						1:'激活',	
						2:'禁止'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],						
						data : [['未激活', 0], ['激活', 1], ['禁止', 2]]
					}),
					listHeight:200,
            	    listWidth:150,
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true,
					readOnly:false
				}											
			},
			ip : {
				display : 'ip地址'
			},
			surname : {
				display : '昵称'
			},
			description : {
				display : '描述',
				editor:'TextArea'
			},
			gender : {
				display : '性别',
				renderer:function(val){
	   			  var dtxt ={'1':'男','2':'女'};
	   			  return dtxt[val];	
	   	        },
	   	        cfg:{
			       	store:new Ext.data.SimpleStore({
				        fields: ['txt', 'val'],
				        data : [['男','1'],['女','0']] 
			        }),
			        displayField:'txt',
			        valueField:'val',
			        typeAhead: true,
			        mode: 'local',
			        triggerAction: 'all',
			        emptyText:'...',
			        selectOnFocus:true,
			        readOnly:true
	        	}	
			},
			birthday : {
				display : '生日',							
				//editor:"DateField",
			    renderer: function (val) {
			    	return renderDate(val);
			    },
				cfg:{
					//type: 'date',
					format:'Y-m-d', altFormats:'Y-m-d'			
				}
				
			},
			nationality : {
				display : '国家'
			},
			countryresidence : {
				display : '地区'			
			},
			lastname : {
				display : '姓'			
			},
			folk : {
				display : '民族'			
			},
			education : {
				display : '学历'			
			},
			phone : {
				display : '联系电话'			
			},
			isvolunteer : {
				display : '希望成为故宫志愿者',
				renderer:function(val){
	   			  var dtxt ={'1':'是','0':'否'};
	   			  return dtxt[val];	
	   	        },
	   	        cfg:{
			       	store:new Ext.data.SimpleStore({
				        fields: ['txt', 'val'],
				        data : [['是','1'],['否','0']] 
			        }),
			        displayField:'txt',
			        valueField:'val',
			        typeAhead: true,
			        mode: 'local',
			        triggerAction: 'all',
			        emptyText:'...',
			        selectOnFocus:true,
			        readOnly:true
	        	}
			},
			stature : {
				display : '身高(cm)'			
			},
			foreignlanguage : {
				display : '外语情况'			
			},
			resume : {
				display : '个人简历'	,
				editor:'TextArea'
			},
			experience : {
				display : '志愿者经历',
				editor:'TextArea'
			},
			servicetime : {
				display : '服务时间',
				editor:'TextArea'
			},
			issubscribenews : {
				display : '是否订阅电子新闻',
				renderer:function(val){
	   			  var dtxt ={'1':'是','0':'否'};
	   			  return dtxt[val];	
	   	        },
	   	        cfg:{
			       	store:new Ext.data.SimpleStore({
				        fields: ['txt', 'val'],
				        data : [['是','1'],['否','0']] 
			        }),
			        displayField:'txt',
			        valueField:'val',
			        typeAhead: true,
			        mode: 'local',
			        triggerAction: 'all',
			        emptyText:'...',
			        selectOnFocus:true,
			        readOnly:true
	        	}	
			},
			langid : {
				display : '用户浏览器语种'			
			},
			ggrsAudit : {
				display : '学术研究系统认证标志'			
			}
		},
		grid : {
			page : true,
			btns : ['打开', '保存', '检索', '排序','刷新']
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '内网用户详细信息',
				titlefunc : function(robj) {
					return '内网用户详细[' + robj.items.map['id'] + ':'+robj.items.map['userid']+']';
				}
			},
			tab : [
			    {
					title : "内网用户基本信息",
					fset : [{
						legend : " ",
						props : ["id", "userid","usergroup","email","description","tmRegister","tmLastlogin","status","ip","issubscribenews","langid","ggrsAudit"]
					}]
			    },
			    {
					title : "内网用户真实信息",
					fset : [{
						legend : " ",
						props : ["name","gender","nationality","folk","countryresidence","birthday","education","phone"]
					}]
			    },
			    {
					title : "内网用户志愿者信息",
					fset : [{
						legend : " ",
						props : ["isvolunteer","stature","foreignlanguage","resume","experience","servicetime"]
					}]
			    }
		    ]
		}
},
//网站用户管理
'dao.hb.CeUserOut':{
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "userid","name","usergroup","email","tmRegister","tmLastlogin","status","ip","surname","description","gender","birthday","nationality","countryresidence","lastname","folk","education","phone","isvolunteer","stature","foreignlanguage","resume","experience","servicetime","issubscribenews","langid","ggrsAudit"]],
						"cns" : ["dao.hb.CeUserOut"],
						"hql" : "from dao.hb.CeUserOut order by id desc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField",
			cfg:{
					readOnly:true
			}
		},
		propdef : {
			id : {
				display : '编号'
			},
			userid : {
				display : '用户名'		
			},
			password : {
				display : '密码'	
			},
			name : {
				display : '姓名'	
			},		
			usergroup : {
				display : '用户组',
				renderer : function(val) {
					var dtxt = {
						'user' : '普通用户组',
						'ggrs_savant' : '学术研究专家用户组',
						'ggrs_sysmanage' : '学术研究系统管理员组'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['普通用户组', 'user'], ['学术研究专家用户组', 'ggrs_savant'], ['学术研究系统管理员组', 'ggrs_sysmanage']]
					}),
					listHeight:200,
            	    listWidth:150,
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true,
					readOnly:false
				}				
			},	
			email : {
				display : '邮件地址'	
			},	
			tmRegister : {
				display : '注册时间',
				//editor:"DateField",
			    renderer: function (val) {
			    	return renderDate(val);
			    },
				cfg:{
					//type: 'date',
					format:'Y-m-d', altFormats:'Y-m-d',
					readOnly:true
				}	
			},		
			tmLastlogin : {
				display : '最后登录时间',
				//editor:"DateField",
			    renderer: function (val) {
			    	return renderDate(val);
			    },
				cfg:{
					//type: 'date',
					format:'Y-m-d', altFormats:'Y-m-d',
					readOnly:true
				}	
			},			
			status : {
				display : '状态'	,				
				renderer : function(val) {
					var dtxt = {
						0:'未激活',
						1:'激活',	
						2:'禁止'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],						
						data : [['未激活', 0], ['激活', 1], ['禁止', 2]]
					}),
					listHeight:200,
            	    listWidth:150,
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true,
					readOnly:false
				}											
			},
			ip : {
				display : 'ip地址'
			},
			surname : {
				display : '昵称'
			},
			description : {
				display : '描述',
				editor:'TextArea'
			},
			gender : {
				display : '性别',
				renderer:function(val){
	   			  var dtxt ={'1':'男','2':'女'};
	   			  return dtxt[val];	
	   	        },
	   	        cfg:{
			       	store:new Ext.data.SimpleStore({
				        fields: ['txt', 'val'],
				        data : [['男','1'],['女','0']] 
			        }),
			        displayField:'txt',
			        valueField:'val',
			        typeAhead: true,
			        mode: 'local',
			        triggerAction: 'all',
			        emptyText:'...',
			        selectOnFocus:true,
			        readOnly:true
	        	}	
			},
			birthday : {
				display : '生日',							
				//editor:"DateField",
			    renderer: function (val) {
			    	return renderDate(val);
			    },
				cfg:{
					//type: 'date',
					format:'Y-m-d', altFormats:'Y-m-d'			
				}
				
			},
			nationality : {
				display : '国家'
			},
			countryresidence : {
				display : '地区'			
			},
			lastname : {
				display : '姓'			
			},
			folk : {
				display : '民族'			
			},
			education : {
				display : '学历'			
			},
			phone : {
				display : '联系电话'			
			},
			isvolunteer : {
				display : '希望成为故宫志愿者',
				renderer:function(val){
	   			  var dtxt ={'1':'是','0':'否'};
	   			  return dtxt[val];	
	   	        },
	   	        cfg:{
			       	store:new Ext.data.SimpleStore({
				        fields: ['txt', 'val'],
				        data : [['是','1'],['否','0']] 
			        }),
			        displayField:'txt',
			        valueField:'val',
			        typeAhead: true,
			        mode: 'local',
			        triggerAction: 'all',
			        emptyText:'...',
			        selectOnFocus:true,
			        readOnly:true
	        	}
			},
			stature : {
				display : '身高(cm)'			
			},
			foreignlanguage : {
				display : '外语情况'			
			},
			resume : {
				display : '个人简历'	,
				editor:'TextArea'
			},
			experience : {
				display : '志愿者经历',
				editor:'TextArea'
			},
			servicetime : {
				display : '服务时间',
				editor:'TextArea'
			},
			issubscribenews : {
				display : '是否订阅电子新闻',
				renderer:function(val){
	   			  var dtxt ={'1':'是','0':'否'};
	   			  return dtxt[val];	
	   	        },
	   	        cfg:{
			       	store:new Ext.data.SimpleStore({
				        fields: ['txt', 'val'],
				        data : [['是','1'],['否','0']] 
			        }),
			        displayField:'txt',
			        valueField:'val',
			        typeAhead: true,
			        mode: 'local',
			        triggerAction: 'all',
			        emptyText:'...',
			        selectOnFocus:true,
			        readOnly:true
	        	}	
			},
			langid : {
				display : '用户浏览器语种'			
			},
			ggrsAudit : {
				display : '学术研究系统认证标志'			
			}
		},
		grid : {
			page : true,
			btns : ['打开', '保存', '检索', '排序','刷新']
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '网站用户详细信息',
				titlefunc : function(robj) {
					return '网站用户详细[' + robj.items.map['id'] + ':'+robj.items.map['userid']+']';
				}
			},
			tab : [
			    {
					title : "网站用户基本信息",
					fset : [{
						legend : " ",
						props : ["id", "userid","usergroup","email","description","tmRegister","tmLastlogin","status","ip","issubscribenews","langid","ggrsAudit"]
					}]
			    },
			    {
					title : "网站用户真实信息",
					fset : [{
						legend : " ",
						props : ["name","gender","nationality","folk","countryresidence","birthday","education","phone"]
					}]
			    },
			    {
					title : "网站用户志愿者信息",
					fset : [{
						legend : " ",
						props : ["isvolunteer","stature","foreignlanguage","resume","experience","servicetime"]
					}]
			    }
		    ]
		}
},
	//稿酬发放
//故宫网站管理  start
'dao.hb.CeQuestionnaire' : {//问卷
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "question", "status", "tmBuild"]],
						"cns" : ["dao.hb.CeQuestionnaire"],
						"hql" : "from dao.hb.CeQuestionnaire order by id asc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField"
		},
		propdef : {
			id : {
				display : '问卷编号',
				cfg:{
					readOnly:true
				}
			},
			question : {
				display : '问卷名称'			
			},
			status : {
				display : '状态'	,
				renderer : function(val) {				
					var dtxt = {
						'0'  :'未发布',
						'1':'发布'					
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					width:100,
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['发布', '1'], ['未发布', '0']]
					}),
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true
				}								
			},
			tmBuild : {
				display : '建立时间',
				editor:"DateField",
			    renderer: function (val) {
			    	return renderDate(val);
			    },
				cfg:{
					readOnly:true,
					type: 'date',
					format:'Y-m-d', altFormats:'Y-m-d'			
				}
			}
		},
		grid : {
			page : true,
			btns : ['打开', '增加','保存', '检索', '排序','刷新']
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '问卷调查详细信息',
				titlefunc : function(robj) {
					return '问卷调查详细[' + robj.items.map['id'] + ':'+robj.items.map['question']+']';
				}
			},
			tab : [
			    {
					title : "问卷调查详细信息",
					fset : [{
						legend : " ",
						props : ["id", "question", "status", "tmBuild"]
					}]
			    }
		    ]
		}
	},
'dao.hb.CeQuestion' : {//问题
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "pid", "item", "ord"]],
						"cns" : ["dao.hb.CeQuestion"],
						"hql" : "from dao.hb.CeQuestion order by id asc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField"
		},
		propdef : {
			id : {
				display : '问题编号',
				cfg:{
					readOnly:true
				}
			},
			pid : {
				display : '问卷编号'			
			},
			item : {
				display : '问题内容'						
			},
			ord : {
				display : '排序'
			}
		},
		grid : {
			page : true,
			btns : ['打开','增加', '保存', '检索', '排序','刷新']
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '问题详细信息',
				titlefunc : function(robj) {
					return '问题调查详细[' + robj.items.map['id'] + ':'+robj.items.map['item']+']';
				}
			},
			tab : [
			    {
					title : "问题调查详细信息",
					fset : [{
						legend : " ",
						props : ["id", "pid", "item", "ord"]
					}]
			    }
		    ]
		}
	},
'dao.hb.CeItems' : {//问题选项
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "pid","selections","count", "ord"]],
						"cns" : ["dao.hb.CeItems"],
						"hql" : "from dao.hb.CeItems order by id asc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField"
		},
		propdef : {
			id : {
				display : '选项编号',
				cfg:{
					readOnly:true
				}
			},
			pid : {
				display : '问题编号'			
			},
			selections : {
				display : '选项内容'						
			},
			count : {
				display : '选择数量统计'	,
				cfg:{
					readOnly:true
				}
			},
			ord : {
				display : '排序'
			}
		},
		grid : {
			page : true,
			btns : ['打开', '增加','保存', '检索', '排序','刷新']
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '选项详细信息',
				titlefunc : function(robj) {
					return '选项详细[' + robj.items.map['id'] + ':'+robj.items.map['selections']+']';
				}
			},
			tab : [
			    {
					title : "选项详细信息",
					fset : [{
						legend : " ",
						props : ["id", "pid","selections","count", "ord"]
					}]
			    }
		    ]
		}
	},	
'dao.hb.CeGift' : {//小礼品
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "name","class_","nameUk", "description","descriptionUk","createtime","userid","updatetime","author","status"]],
						"cns" : ["dao.hb.CeGift"],
						"hql" : "from dao.hb.CeGift order by id desc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField"
		},
		propdef : {
			id : {
				display : '编号',
				cfg:{
					readOnly:true
				}
			},
			name : {
				display : '名称'						
			},
			class_ : {
				display : '分类',						
		 		editor :'TreeField',
	              cfg:{
	              	 width:350,
	              	 text:'.....',
	            	 fieldLabel:'树形下拉',
	            	 listHeight:250,
	            	 listWidth:250,
	            	 //checkModel:'multiple',
	            	 selectValueModel:'all',
	            	 returnData:'includeParent',
	            	// valueField:'id',
		   		    dataUrl:'/cc/servlet/JSonBaseServlet?',
		   		    baseParams:{mode:'TREE',hql:' ',tablename:'dao.hb.BaseGift',fieldnames:'id,name,parentId',filter:" order by parentId"
		   		    }
	              }
			},		
			nameUk : {
				display : '英文名'
			},
			description : {
				display : '描述',
				editor:"TextArea"
			},
			descriptionUk : {
				display : '英文描述',
				editor:"TextArea"						
			},
			createtime : {
				display : '建立时间',
				renderer : function(val) {
					return renderDate(val);
				},
				cfg:{
					readOnly:true
				}
			},
			userid : {
				display : '用户id'						
			},
			updatetime : {
				display : '更新时间',
				renderer : function(val) {
					return renderDate(val);
				},
				cfg:{
					readOnly:true
				}
			},
			author : {
				display : '作者'						
			},
			status : {
				display : '状态'	,
				renderer : function(val) {
					var dtxt = {
						0 : '禁止',
						1 : '允许'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
			cfg : {
				store : new Ext.data.SimpleStore({
					fields : ['txt', 'val'],
					data : [['允许',1 ], ['禁止',0]]
				}),
				displayField : 'txt',
				valueField : 'val',
				typeAhead : true,
				mode : 'local',
            	listHeight:100,
            	listWidth:100,
				triggerAction : 'all',
				emptyText : '...',
				selectOnFocus : true
			}								
		  }
		},
		relviews:[{
			titlefunc : function(robj) {
				return '礼品<' + robj.items.map['id'] + '>相关附件';
			},
			v1 : {
				vn : 'rel_subject_attach',
				filterfunc : function(robj, ui) {
					var cn = robj.cns[0];
	 				var bWF = (cn ==Bat.gvs.AVENSCN);
					var hql;
					if(bWF)
						hql = " from Rel A , CeAttachment B where B.id=A.id2 and A.entity1='CE_GIFT' and A.entity2='CE_ATTACHMENT' and A.id1="
							+ (robj.items.map['A.docid']) + " order by A.ord";
					else
						hql = " from Rel A , CeAttachment B where B.id=A.id2 and A.entity1='CE_GIFT' and A.entity2='CE_ATTACHMENT' and A.id1="
							+ (robj.items.map['id']||0) + " order by A.ord";
					ui.req.map.psMap.map.hql = hql;
					ui.hql = hql;
				}
			},
			v2 : {
				vn : 'dao.hb.CeAttachment',
				vfunc : function(vw) {
					var btns = ['检索', '排序', '刷新'];
					btns[btns.length] = vw.grid.btns[7];
					vw.grid.btns = btns;
					vw.req.map.psMap.map.rownum=5;
				}
			},
			title : '相关附件'
		}],
		grid : {
			hide: ['description','nameUk','descriptionUk','createtime','userid','author'],
		 	hidebtns_objmode:[7],
			page : true,
			btns : ['打开', '增加','删除','保存','检索', '排序','刷新',{
	   		text: '关联礼品',
	   		iconCls: 'plugin_add',
			handler : function(btn){
		    	buildRel(btn,'CE_GIFT','id',['name']);
		    }}]
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '详细信息',
				titlefunc : function(robj) {
					return '礼品详细[' + robj.items.map['id'] +']';
				}
			},
			tab : [
			    {
					title : "礼品详细	1",
					fset : [{
						legend : " ",
						props : ["id", "name","class_","nameUk", "description","descriptionUk","createtime","userid","updatetime","author","status"]
					}]
			    }
		    ]
		}
	},	
'dao.hb.CeAttachment' : {//网站附件
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "name","purpose","nameUk", "suffix","spec","filesize","download","path"]],
						"cns" : ["dao.hb.CeAttachment"],
						"hql" : "from dao.hb.CeAttachment where id<"+KX_KV_START+" order by id desc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField"
		},
		propdef : {
			id : {
				display : '编号',
				cfg:{
					readOnly:true
				}
			},
			name : {
				display : '名称',
				cfg:{
					allowBlank:false
				}
			},
			purpose : {
				display : '用途'	,
		 		editor :'TreeField',
	              cfg:{
	              	 width:350,
	              	 text:'.....',
	            	 fieldLabel:'树形下拉',
	            	 listHeight:250,
	            	 listWidth:250,
	            	 //checkModel:'multiple',
	            	 selectValueModel:'all',
	            	 //returnData:'includeParent',
	            	 valueField:'id',
		   		    dataUrl:'/cc/servlet/JSonBaseServlet?',
		   		    baseParams:{mode:'TREE',hql:' ',tablename:'dao.hb.BaseAttachtype',textIdUnion:'Y',fieldnames:'id,name,parentid',filter:" order by parentid, ord"}
		   	      }	 							
			},
			nameUk : {
				display : '英文名'
			},
			suffix : {
				display : '后缀',
				cfg:{
					readOnly:true
				}	
			},
			spec : {
				display : '规格'						
			},
			filesize : {
				display : '文件大小[字节]',
				cfg:{
					readOnly:true
				}	
			},
			download : {
				display : '下载次数'	,					
				cfg:{
					readOnly:true
				}	
			},
			path : {
				display : '路径',
				editor:'ATField',
				cfg:{
					listeners:{ 
						fileselected:function(af,val){
						  var pos = val.lastIndexOf(".");
						  if(pos>0){
						  	var suf = val.substring(pos+1);
						    af.ui.editors['suffix'][0].setValue(suf);
						    af.item['suffix']=suf.toLowerCase();
						  }
						}
					}
				},
				renderer:function(itxt,r,col,l){
				 if(!itxt) return "";
				 if(itxt.indexOf('\\')!=-1){
				   var url=Bat.Host+"/upload"+itxt.replace(/\\/g,'/'); 
				   return "<a href=\""+url+"\" target=\"_blank\">"+itxt+"</a>";;
				 }
		       	 var pos1 = itxt.indexOf('[');
		       	 var pos2 = itxt.indexOf(']');
		       	 if(pos1==-1 || pos2==-1)
		       	   return "";
		       	 pos2 = itxt.lastIndexOf('~',pos2);
		       	 var sp = itxt.substring(pos1+1,pos2).replace(/~/g,'/');
		       	 var suffix = col.data.suffix;
		       	 var spec = col.data.spec;
		       	 if(spec&&spec.trim()!='')
		       	   sp=spec+'/'+sp;
		       	 if(suffix&&suffix.trim()!='')
		       	   sp=suffix+'/'+sp;
		       	 //var suffix=itxt.substr(itxt.length-4).toLowerCase();
		    	 var url=Bat.Host+"/upload/"+sp+"/"+itxt;
				 return "<a href=\""+url+"\" target=\"_blank\">"+itxt+"</a>";
				}
			}
		},
		grid : {
			hide: ['purpose','nameUk','suffix','spec','download'],
		 	hidebtns_objmode:[7],  //wjh
			hidebtns_objview:[7],
			page : true,
			btns : ['打开', '保存','增加','删除','检索', '排序','刷新',{
	   		text: '关联附件',
	   		iconCls: 'plugin_add',
			handler : function(btn){
		    	buildRel(btn,'CE_ATTACHMENT','id',['name']);
		    }}]
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '详细信息',
				titlefunc : function(robj) {
					return '附件详细[' + robj.items.map['id'] +']';
				}
			},
			tab : [
			    {
					title : "附件详细信息",
					fset : [{
						legend : " ",
						props : ["id", "name","purpose","nameUk", "suffix","spec","filesize","download","path"]
					}]
			    }
		    ]
		}
	},	

'dao.hb.CeSysVar' : {
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "name","nameCn","type", "value","valueUk","valueTw","remark","lastUpdate"]],
						"cns" : ["dao.hb.CeSysVar"],
						"hql" : "from dao.hb.CeSysVar order by id desc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField"
		},
		propdef : {
			id : {
				display : '编号',
				cfg:{
					readOnly:true
				}
			},
			name : {
				display : '变量名',
				cfg:{
					allowBlank:false
				}
			},
			nameCn : {
				display : '中文名'						
			},
			type : {
				display : '类型',
				renderer : function(val) {
					var dtxt = {
						'1' : '控制变量',
						'2' : '问候语'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['控制变量', '1'], ['问候语', '2']]
					}),
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true
				}
			},
			value : {
				display : '内容',
				editor:'TextArea'
			},
			valueUk : {
				display : '英文内容',
				editor:'TextArea'						
			},
			valueTw : {
				display : '繁体内容',
				editor:'TextArea'
			},
			remark : {
				display : '备注'	,
				editor:'TextArea'					
			},
			lastUpdate : {
				display : '最近更新',
				renderer : function(val) {
					return renderDate(val);
				},
				cfg:{
					readOnly:true
				}
			}
		},
		grid : {
			hide: ['value','valueUk','valueTw','remark'],
		 	hidebtns_objmode:[7],
			hidebtns_objview:[7],
			page : true,
			btns : ['打开','增加',
			//'删除',
			'检索', '排序','保存',
			'刷新',{
	   		text: '更新索引',
	   		iconCls: 'plugin_add',
			handler : function(btn){
			 	  createIndex(btn,"FSearchHandle","确定要更新全文检索索引吗?")
		    	}
			}
		    ]
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '详细信息',
				titlefunc : function(robj) {
					return '系统变量详细[' + robj.items.map['id'] +']';
				}
			},
			tab : [
			    {
					title : "系统变量详细信息",
					fset : [{
						legend : " ",
						props : ["id", "name","nameCn","type", "value","valueUk","valueTw","remark","lastUpdate"]
					}]
			    }
		    ]
		}
	},	
	
'dao.hb.CeLink' : {
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "title","address","synopsis", "orderid","attachid"]],
						"cns" : ["dao.hb.CeLink"],
						"hql" : "from dao.hb.CeLink order by id ",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField"
		},
		propdef : {
			id : {
				display : '编号',
				cfg:{
					readOnly:true
				}
			},
			title : {
				display : '名称'
			},
			address : {
				display : 'URL地址'	
			},
			synopsis : {
				display : '介绍',
				editor:'TextArea'
			},
			orderid : {
				display : '排序'
			},
			attachid : {
				display : '小图标id'
			}

		},
		grid : {
			hide: ['question','answer'],
			page : true,
			btns : ['打开','保存','增加','删除','检索', '排序','刷新']
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '详细信息',
				titlefunc : function(robj) {
					return '网站链接详细[' + robj.items.map['id'] +']';
				}
			},
			tab : [
			    {
					title : "网站链接详细信息",
					fset : [{
						legend : " ",
						props : ["id", "title","address","synopsis", "orderid","attachid"]
					}]
			    }
		    ]
		}
	},	
'dao.hb.MailSend' : {
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "name","reason","body","textcontent","manageremail", "filter","dtCreate","dtSend","dtSended","status","remark"]],
						"cns" : ["dao.hb.MailSend"],
						"hql" : "from dao.hb.MailSend order by id ",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField"
		},
		propdef : {
			id : {
				display : '编号',
				cfg:{
					readOnly:true
				}
			},
			name : {
				display : '邮件题名'
			},
			reason : {
				display : '事由'	
			},
			body : {
				display : '邮件正文',
				editor:'TextArea'
			},
			textcontent : {
				display : '邮件正文文本格式',
				editor:'TextArea'
			},
			manageremail : {
				display : '组织者Email'	
			},
			filter : {
				display : '过滤条件',
				editor:'TextArea'
			},
			dtCreate : {
				display : '建立日期',
				renderer : function(val) {
					return renderDate(val);
				},
				cfg:{
					readOnly:true
				}
			},
			dtSend : {
				display : '发送日期',
				editor:'DateField',
		           renderer:function(val){
					if(val!=null&&val.time){
						return renderDate(val);
					}else{
						return Ext.util.Format.date(val,"Y-m-d");
					}
				   }  
			},
			dtSended : {
				display : '完成时间',
				renderer : function(val) {
					return renderDate(val);
				},
				cfg:{
					readOnly:true
				}
			},
			status : {
				display : '状态',
				renderer : function(val) {				
					var dtxt = {
						'0'  :'禁用',
						'1':'待发送',
						'2':'已发送',
						'3':'测试邮件发送'	
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					width:120,
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['禁用', '0'],['待发送', '1'],['已发送', '2'],['测试邮件发送', '3']]
					}),
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true
				}								
			},
			remark : {
				display : '备注',
				editor:'TextArea'
			}
		},
		grid : {
			hide: ['body','textcontent','filter','remark'],
			page : true,
			btns : ['打开','保存','增加','删除','检索', '排序','刷新']
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '详细信息',
				titlefunc : function(robj) {
					return '邮件发送详细[' + robj.items.map['id'] +']';
				}
			},
			tab : [{
					title : "基本信息",
					fset : [{
						legend : " ",
						props : ["id", "name","reason","manageremail","dtCreate","dtSend","dtSended","status"]
					}]
			    },{
					title : "邮件正文HTML",
					fset : [{
						legend : " ",
						props : ["body"]
					}]
			    },{
					title : "邮件正文文本格式",
					fset : [{
						legend : " ",
						props : ["textcontent"]
					}]
			    },{
					title : "过滤条件",
					fset : [{
						legend : " ",
						props : [ "filter"]
					}]
			    },{
					title : "备注",
					fset : [{
						legend : " ",
						props : [ "remark"]
					}]
			    }
		    ]
		}
	},	
	'dao.hb.CeAlbum' : {
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "title","reason","body", "imgId","bgId","dtCreate","dtPublish","status","remark"]],
						"cns" : ["dao.hb.CeAlbum"],
						"hql" : "from dao.hb.CeAlbum order by id desc ",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField"
		},
		propdef : {
			id : {
				display : '编号',
				cfg:{
					readOnly:true
				}
			},
			title : {
				display : '名称'
			},
			reason : {
				display : '类型'	
			},
			body : {
				display : 'div正文',
				editor:'TextArea'
			},
			imgId : {
				display : '索引图附件序号'
			},
			bgId : {
				display : '背景图附件序号'
			},
			dtCreate : {
				display : '建立日期',
				renderer : function(val) {
					return renderDate(val);
				},
				cfg:{
					readOnly:true
				}
			},
			dtPublish : {
				display : '发布日期',
				editor:'DateField',
		           renderer:function(val){
					if(val!=null&&val.time){
						return renderDate(val);
					}else{
						return Ext.util.Format.date(val,"Y-m-d");
					}
				   }  
			},
			status : {
				display : '状态',
				renderer : function(val) {				
					var dtxt = {
						'0'  :'禁用',
						'1':'发布'					
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					width:100,
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['发布', '1'], ['禁用', '0']]
					}),
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true
				}								
			},
			remark : {
				display : '备注',
				editor:'TextArea'
			}

		},
		grid : {
			hide: ['body','remark'],
			page : true,
			btns : ['打开','保存','增加','删除','检索', '排序','刷新']
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '网站特辑',
				titlefunc : function(robj) {
					return '网站特辑详细[' + robj.items.map['id'] +']';
				}
			},
			tab : [{
					title : "基本信息",
					fset : [{
						legend : " ",
						props : ["id", "title","reason", "imgId","bgId","dtCreate","dtPublish","status" ]
					}]
			    },{
					title : "div正文",
					fset : [{
						legend : " ",
						props : ["body"]
					}]
			    },{
					title : "备注",
					fset : [{
						legend : " ",
						props : ["remark"]
					}]
			    }
		    ]
		}
	},	
	
'dao.hb.StaWeblog' : {
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id","name"],["id", "channelId","selfIpAmount","selfPageAmount", "selfFileAmount","totalIpAmount","totalPageAmount","totalFileAmount","logDate","dateStr"]],
						"cns" : ["dao.hb.BaseWebsiteclass","dao.hb.StaWeblog"],
						"hql" : "from dao.hb.BaseWebsiteclass A,dao.hb.StaWeblog B where A.id=B.channelId order by A.id ",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField"
		},
		propdef : {
			'A.id':{
			display:'频道id'
			},
			'A.name':{
			display:'频道名称'
			},
			'B.id' : {
				display : '编号',
				cfg:{
					readOnly:true
				}
			},
			'B.channelId' : {
				display : '频道id'
			},			
			'B.selfIpAmount' : {
				display : '本频道IP访问数'	
			},
			'B.selfPageAmount' : {
				display : '本频道页面访问数'
			},
			'B.selfFileAmount' : {
				display : '本频道文件访问数'
			},
			'B.totalIpAmount' : {
				display : '含子频道IP访问数'
			},
			'B.totalPageAmount' : {
				display : '含子频道页面访问数'
			},
			'B.totalFileAmount' : {
				display : '含子频道文件访问数'
			},
			'B.logDate' : {
				editor:'DateField',
				display : '日志日期',
				renderer : function(val) {
					return renderDate(val);
				},
				cfg:{
					readOnly:true
				}
			},		

			'B.dateStr' : {
				display : '统计标志'


			}

		},
		grid : {
			hide: ['question','answer','B.channelId','B.id'],
			page : true,
			btns : ['打开','检索', '排序','刷新',
			     {
					text:"流量统计",
					iconCls: 'sta',
					handler : function(btn){
							//// gaofei 2009.11.4
						//CC.showStadlg(btn.el.dom);
						CC.showStaDlg(btn);
							////
					}	
			     }
			]
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '频道日志统计详细信息',
				titlefunc : function(robj) {
					return '频道日志统计详细信息[' + robj.items.map['B.id'] +']';
				}
			},
			tab : [
			    {
					title : "频道日志统计详细信息",
					fset : [{
						legend : " ",
						props : ["B.id", "B.channelId","B.selfIpAmount","B.selfPageAmount", "B.selfFileAmount","B.totalIpAmount","B.totalPageAmount","B.totalFileAmount","B.logDate","B.dateStr"]
					}]
			    }
		    ]
		}
	},	
		
	
'dao.hb.CeAnswer' : {//常见问题
	  req : {
			"map" : {
				"psMap" : {
					"map" : {
						"rownum" : 15,
						"pss" : [["id", "question","answer","ord", "tmQuestion","tmAnswer","userQuestion","userAnswer"]],
						"cns" : ["dao.hb.CeAnswer"],
						"hql" : "from dao.hb.CeAnswer order by id desc",
						"start" : 0
					},
					"javaClass" : "java.util.HashMap"
				},
				"SN" : null
			},
			"javaClass" : "java.util.HashMap"
		},
		defautdef : {
			editor : "TextField"
		},
		propdef : {
			id : {
				display : '编号',
				cfg:{
					readOnly:true
				}
			},
			question : {
				display : '问',
				editor:'TextArea'	
			},
			answer : {
				display : '答',
				editor:'TextArea'	
			},
			userQuestion : {
				display : '提问者',
				cfg:{
					readOnly:true
				}
			},
			userQuestion : {
				display : '提问者',
				cfg:{
					readOnly:true
				}
			},
			userAnswer : {
				display : '作答者',
				cfg:{
					readOnly:true
				}
			},
			tmQuestion : {
				display : '提问时间',
				renderer : function(val) {
					return renderDate(val);
				},
				cfg:{
					readOnly:true
				}
			},
			tmAnswer : {
				display : '作答时间',
				renderer : function(val) {
					return renderDate(val);
				},
				cfg:{
					readOnly:true
				}
			}

		},
		grid : {
			hide: ['question','answer'],
			page : true,
			btns : ['打开','增加','删除','检索', '排序','刷新']
		},
		edit : {
			dlg : {
				width : 600,
				height : 380,
				title : '详细信息',
				titlefunc : function(robj) {
					return '常见问题详细[' + robj.items.map['id'] +']';
				}
			},
			tab : [
			    {
					title : "常见问题详细信息",
					fset : [{
						legend : " ",
						props : ["id", "question","answer","ord", "tmQuestion","tmAnswer","userQuestion","userAnswer"]
					}]
			    }
		    ]
		}
	},	
	

	
//故宫网站管理 end
  //11.12e
  //图像比对start
	  'dao.hb.Imagebd':{
    	handles:{general:{'before_load':function(ui){
			
    	 }
    	 }},	  	
	 req:{"map":{"psMap":{"map":{"rownum":12,"pss":[["imageId","imageName","cdlabel","imgFile","confirmFlag","objNo","classname","registerMan","registerTime"]],"cns":["dao.hb.Image"],"hql":"from dao.hb.Image "},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
	   defautdef:{
	   	 cfg:{
	   		  readOnly:false
	   	 }
	   },
	 propdef:{
	   	 classname:{
	       display:"影像分类"
	   	 },
	   	 objNo:{
	       display:"文物号"
	   	 },
	   	 imageId:{
	       display:"影像ID"
	   	 },
	   	 confirmFlag:{
	        display:"确认结果",
			editor : 'ComboBox',
			cfg : {
				store : new Ext.data.SimpleStore({
					fields : ['txt', 'val'],
					data : [['确认','Y' ], ['未确认','N']]
				}),
				displayField : 'txt',
				valueField : 'val',
				typeAhead : true,
				mode : 'local',
            	listHeight:100,
            	listWidth:100,
				triggerAction : 'all',
				emptyText : '...',
				selectOnFocus : true
			}		
	   	 },
  	   	 imageName:{
	       display:"影像名称",
	       editor : "TextField"
	   	 },
 	   	 cdlabel:{
	       display:"影像光盘卷标",
	       editor : "TextField"
	   	 },
	   	 imgFile:{
	       display:"影像文件名",
	       editor : "TextField"
	   	 },
	   	 registerMan:{
	       display:"新网站小影像",
		   renderer:function(val,r,col,l){
	   		   var cdlabel=null;
		   	   if(col.data.cdlabel){
		   	       cdlabel=col.data.cdlabel.split(".");
		   	   }else{
		   	   	   cdlabel=["","",""];
		   	   }
		       return "<img style='height:40px;' src='http://192.168.0.50/files/image/s/"+cdlabel[0]+"/"+cdlabel[1]+"/"+cdlabel[2]+"/"+col.data.imgFile+"[126PX].jpg'></img>";
		   }
	   	 },
	   	 registerTime:{
	   	   display:"老网站小影像",
	       renderer:function(val,r,col,l){
	   		   var cdlabel=null;
		   	   if(col.data.cdlabel){
		   	       cdlabel=col.data.cdlabel.split(".");
		   	   }else{
		   	   	   cdlabel=["","",""];
		   	   }
		       return "<img style='height:40px;' src='"+getimgPathOld(col.data.imageId,'s')+"'></img>";
		   }
	   	 }
	 },
	 grid:{
	 	 hide:[],
		 page:true,
		 multiSelect: true,
		 hidebtns_objview:[5],
		 hidebtns_objmode:[5],
		 btns:['保存','检索','刷新','排序',{
	   		text: '查看中影像',
	   		iconCls: 'photo',
			handler : function(btn){
	   		    var cdlabel=null;
	   		    var sels=btn.ui.grid.getSelections();
	   		    if(!sels[0]){
	   		    	return false;
	   		    }
		   	    if(sels[0].data.cdlabel){
		   	       cdlabel=sels[0].data.cdlabel.split(".");
		   	    }else{
		   	   	   cdlabel=["","",""];
		   	    }
						Ext.MessageBox.show({
							title:"中影像",
							msg:"<div style='width:800px;'>"+
								"<span><span style='width:30px;'>新系统影像:</span>"+
								"<img  title='新系统影像' style='heigth:25%;width:25%;' src='http://192.168.0.50/files/image/m/"+cdlabel[0]+"/"+cdlabel[1]+"/"+cdlabel[2]+"/"+sels[0].data.imgFile+"[400PX].jpg'></img>"+
								"</span><span><span style='width:30px;'>旧系统影像:</span>"+
								"<img  title='旧系统影像' style='heigth:25%;width:25%;' src='"+getimgPathOld(sels[0].data.imageId,'m')+"'></img>"+
								"</span></div>",
							maxWidth:900
						});
				}
		 }]
	   },   edit:{
	   dlg:{width:600,height:360,title:'影像详细信息',titlefunc:function(robj){
		   return '详细>>影像['+robj.items.map['imageId']+']';
	   }
	   },
	   	//tab:[{title:"影像详细信息",fset:[{legend:" ",props:["imageId","objNo","objName","imageName","imageEngname","imageJapname","imgType","imgColor","cdlabel","imgFile","cdNo","photographer","provider","registerMan","registerTime","regCReceiver","regCTime","scanSuffix","scanMan","scanTime","scanReceiver","scanCTime","suffix","handler","handleTime","handleCTime","haveSmall","haveBigimage","isLivepicture","confirmMan","confirmTime","confirmFlag","returnReceiver","returnTime","mimgWidth","mimgHeight","keywords"]}]}
	   tab:[{title:"影像详细信息1",
	   		fset:[{legend:"基本信息",props:["imageId","objNo","objName","imageName","imageEngname","imageJapname","imgType","imgColor","cdlabel","imgFile"]},
			{legend:"登记信息",props:["cdNo","photographer","provider","registerMan","registerTime","regCReceiver","regCTime","scanSuffix","scanMan","scanTime"	                                                         
	                                                           ]}	         ]},
	         {title:"影像详细信息2",
	         fset:[{legend:" ",props:["scanReceiver","scanCTime","suffix","handler","handleTime","handleCTime","haveSmall","haveBigimage","isLivepicture","confirmMan","confirmTime","confirmFlag","returnReceiver","returnTime","mimgWidth","mimgHeight","keywords"]}
	         ]}
	   	] }
  
  },
  'dao.hb.Contribution':{
    	handles:{general:{'before_put':function(ui){
    		for(var i=0,len=ui.objs.length;i<len;i++){
    			var obj = ui.objs[i];
    			if(obj.action=='U'){
    				var txt  = obj.items.map['conObjno']||'';
    				var vtxt =reset_rnum(txt);
    				obj.items.map['conObjno']=vtxt;
    				if (vtxt!=txt)
    				  alert('文物号['+txt+']规范为['+vtxt+']');
    			}
    		}
    	}
    	}},
   req:{"map":{"psMap":{"map":{"rownum":15,"pss":[["conId","conName","conEra","conAuthor","conClass","conObjid","eraId","conObjno","lastUpdate"]],"cns":["dao.hb.Contribution"],"hql":"from dao.hb.Contribution order by conId desc","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
       editor:"TextField"
   },
   propdef:{
   	    "conId":{
	 		display:'捐献物ID',
			cfg:{
				readOnly:true
			}
	 	},
	 	"conName":{
	 		display:'捐献物名称'
	 	},
	 	"conEra":{
	 		display:'捐献物时代'
	 	},	 
	 	"conAuthor":{
	 		display:'捐献物作者'
	 	},
	 	"conClass":{
	 		display:'捐献物类别'
	 	},
	 	"conObjid":{
	 		display:'捐献物相关对象ID'
	 	},
	   	"eraId":{
	       display:'时代ID'
	   	},
	   	"conObjno":{
	       display:'捐献物相关对象文物编号'	       
	   	}
    },
    grid:{
		 page:true,
		 hide:['lastUpdate'],
		 //hide:["objId","description","sell","wordPicture","packaging","countRemark","note","author","objNumber","price","keywords","bookbinding","format"],
		 hidebtns_objview:[1,2,3,7],	//对象查看
		 hidebtns_objmode:[7],           //草稿
		 btns:['打开','增加','删除','保存','检索','排序','刷新',{		 
	   		text: '关联捐献物',
	   		iconCls: 'plugin_add',
			handler : function(btn){
		    	buildRel(btn,'CONTRIBUTION','conId',['conName']);
		    }}]
	}, 	
    edit:{
  	    dlg:{width:600,height:380,title:'捐献详细信息',titlefunc:function(robj){
		    return '捐献详细['+robj.items.map['conId']+']';
	    }
	},
   	tab:[
   		 {title:"详细信息",fset:[{legend:" ",props:["conId","conName","conEra","conAuthor","conClass","conObjid","eraId","conObjno"]}   		 
   		 ]}
   	]}
  },  
  'dao.hb.CeModule':{
   req:{"map":{"psMap":{"map":{"rownum":15,"pss":[["id","name","nameCn","moduleip","status","statusTime","note"]],"cns":["dao.hb.CeModule"],"hql":"from dao.hb.CeModule order by id","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
       editor:"TextField"
   },
   propdef:{
   	    "id":{
	 		display:'编号',
			cfg:{
				readOnly:true
			}
	 	},
	 	"name":{
	 		display:'模块名称'
	 	},
	 	"nameCn":{
	 		display:'模块名称中文'
	 	},	 
	 	"moduleip":{
	 		display:'服务器Ip'
	 	},
	 	"status":{
				display : '状态'	,
				renderer : function(val) {				
					var dtxt = {						
						'1':'正常',	
						'2':'异常',
						'3':'警告'
					};
					return dtxt[val];
				},
				editor : 'ComboBox',
				cfg : {
					width:100,
					store : new Ext.data.SimpleStore({
						fields : ['txt', 'val'],
						data : [['正常', '1'], ['异常', '2'], ['警告', '3']]
					}),
					displayField : 'txt',
					valueField : 'val',
					typeAhead : true,
					mode : 'local',
					triggerAction : 'all',
					emptyText : '...',
					selectOnFocus : true
				}	 		
	 	},
	 	"statusTime":{	 		
			display : '状态更新时间',
				renderer : function(val) {
					return renderDate(val);
				},
				cfg:{
					readOnly:true
				}	 		
	 	},
	   	"note":{
	       display:'备注'
	   	}
    },
    grid:{
		 page:true,
		 btns:['打开','检索','排序','刷新']
	}, 	
    edit:{
  	    dlg:{width:600,height:380,title:'模块详细信息',titlefunc:function(robj){
		    return '模块详细['+robj.items.map['id']+']';
	    }
	},
   	tab:[
   		 {title:"详细信息",fset:[{legend:" ",props:["id","name","nameCn","moduleip","status","statusTime","note"]}   		 
   		 ]}
   	]}
  },    
  'dao.hb.CeModuleLog':{
   req:{"map":{"psMap":{"map":{"rownum":15,"pss":[["id","moduleId","userip","userid","description","begintime","endtime","status","note","logdate","serverip"]],"cns":["dao.hb.CeModuleLog"],"hql":"from dao.hb.CeModuleLog order by id desc","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
       editor:"TextField"
   },
   propdef:{
   	    "id":{
	 		display:'编号',
			cfg:{
				readOnly:true
			}
	 	},
	 	"moduleId":{
	 		display:'模块编号',
	 		cfg:{
				readOnly:true
			}
	 	},
	 	"userip":{
	 		display:'操作者Ip',
	 		cfg:{
				readOnly:true
			}
	 	},	 
	 	"serverip":{
	 		display:'服务器Ip',
	 		cfg:{
				readOnly:true
			}
	 	},		 	
	 	"userid":{
	 		display:'用户id',
	 		cfg:{
				readOnly:true
			}
	 	},
	 	"description":{
	 		display:'描述',
	 		cfg:{
				readOnly:true
			}
	 	},
	 	"begintime":{	 		
			display : '操作起始时间',
				renderer : function(val) {
					return renderDate(val);
				},
				cfg:{
					readOnly:true
				}	 		
	 	},	 
	 	"endtime":{	 		
			display : '操作结束时间',
				renderer : function(val) {
					return renderDate(val);
				},
				cfg:{
					readOnly:true
				}	 		
	 	},	 		 	
	 	"status":{
				display : '状态'	,
				renderer : function(val) {				
					var dtxt = {						
						'1':'正常',	
						'2':'异常',
						'3':'警告'
					};
					return dtxt[val];
				},
				cfg:{
				readOnly:true
			     }	 		
	 	},	 	 
	   	"note":{
	       display:'备注'
	   	},
	 	"logdate":{	 		
			display : '日志时间',
				renderer : function(val) {
					return renderDate(val);
				},
				cfg:{
					readOnly:true
				}	 		
	 	}
    },
    grid:{
		 page:true,
		 btns:['打开','检索','排序','刷新']
	}, 	
    edit:{
  	    dlg:{width:600,height:380,title:'模块日志详细信息',titlefunc:function(robj){
		    return '模块日志详细['+robj.items.map['id']+']';
	    }
	},
   	tab:[
   		 {title:"详细信息",fset:[{legend:" ",props:["id","moduleId","userip","userid","description","begintime","endtime","status","note","logdate"]}   		 
   		 ]}
   	]}
  },    
  //图像比对end
  /**
   * views for relations
   * @type 
   */
    'rel_subject_image':{
		 req:{"map":{"psMap":{"map":{"rownum":5,"pss":[["id","entity1","id1","entity2","id2","ord"],["imageName"]],"cns":["dao.hb.Rel","dao.hb.Image"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
		   defautdef:{
		   	 editor:"TextField"
		 },
		  propdef:{
	   	    'A.id':{
		 		display:'编号',
				cfg:{
					readOnly:true
				}
		 	},
	   	    'A.id2':{
		 		display:'影像编号',
				cfg:{
					readOnly:true
				}
		 	},
		  	'A.ord':{
		  		display:'排序'
		  	},
		  	'B.imageName':{
		  		display:'影像名称'
		  	}
		  },
		 grid:{
		 	hide:["A.entity1","A.id1","A.entity2"],
		 	hidebtns_objview:[0,1],
		 	btns:['删除','保存'],
			page:true
		},edit:{
		  	dlg:{width:600,height:360,title:'专题——影像详细信息'},
		   	tab:[{title:"专题——影像详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord","B.imageName"]}]}
		   	] }   
	  },
  'rel_subject_doc':{
	 req:{"map":{"psMap":{"map":{"pss":[["id","subjectid","docid","parentid","ord"],["title"]],"cns":["dao.hb.SubjectDoc","dao.hb.Doc"],"hql":"from dao.hb.SubjectDoc A, dao.hb.Doc B where A.docid=B.id order by A.ord","start":0},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
   defautdef:{
   	 editor:"TextField"
   },
   propdef:{
   	    'A.id':{
	 		display:'编号',
	 	 cfg:{
		  readOnly:true
	     }   	 
	 	},
	 	'A.subjectid':{
	 		display:'专题id',
	 	 cfg:{
		  readOnly:true
	     }   	 
	 	},
	 	'A.docid':{
	 		display:'文稿id'
	 	},	
	 	'A.ord':{
	 		display:'排序',
		 	 cfg:{
			  readOnly:false
		     }	 		
	 	},	 	
	 	'A.parentid':{
              display:'父id'
	 	},
	 	'B.title':{
	 		display:'文稿题名', 		
	 	 cfg:{
		  readOnly:true
	     }   	 
	 	}	
   },
  grid:{
		 hide:["type"],
		 page:true,
		 btns:[{
			text:'增加',
	        cls: 'x-btn-text-icon',
	        icon: '../img/iconNew.gif',
			handler:function(btn){
				var ui=btn.ui;
			    ui.grid.stopEditing();
				var objs=ui.ds.proxy.data;
	        	var o=Bat.clone(objs[0]);
	        	o.action="A";
	        	o.items.map['A.subjectid'] = getfilterVal(ui.hql,'A.subjectid=');
	        	objs[objs.length]=o;
	        	//forbid reload from remote server
	        	ui.ds.proxy.reload=false;
	        	ui.ds.load();
	        	ui.grid.getView().refresh();
			}
		},'删除','保存','检索','排序','刷新']
  },    
  edit:{
  	dlg:{width:600,height:360,title:'基表详细信息',titlefunc:function(robj){
		return '详细>>专题文稿['+robj.items.map['id']+']';
	}
	},
   	tab:[
   		 {title:"详细信息",fset:[{legend:" ",props:["A.id","A.subjectid","A.docid","A.parentid","A.ord"]}]}
   	] }
  },    

  'rel_doc_relic':{
      req:{"map":{"psMap":{"map":{"rownum":MAX_ROW_ORD,"pss":[["id","entity1","id1","entity2","id2","ord","title"],["objName","objNo"]],"cns":["dao.hb.Rel","dao.hb.Relic"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
	      defautdef:{
		      editor:"TextField"
		  },
		  propdef:{
	   	    'A.id':{
		 		display:'编号',
				cfg:{
					readOnly:true
				}
		 	},
	   	    'A.id2':{
		 		display:'文物编号',
				cfg:{
					readOnly:true
				}
		 	},
		  	'A.ord':{
		  		display:'排序'
		  	},
		  	'A.title':{
		  		display:'栏目名'
		  	},
		  	'B.objName':{
		  		display:'文物名称'
		  	},
		  	'B.objNo':{
		  		display:'文物号'
		  	}
		  },
		  grid:{
			cfg:{
				autoScroll:true,
				autoHeight:false,
				enableDragDrop: true
			},
		  	hide:["A.entity1","A.id1","A.entity2"],
		  	hidebtns_objview:[0,1],
		  	btns:['删除','保存'],
		      page:true
		  },
		  edit:{
			  	dlg:{width:600,height:360,title:'文稿——文物详细信息'},
			   	tab:[{title:"文稿——文物详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord","B.objName","B.objNo"]}]}
		  ]
      }   
  }, 
'rel_prjproject_lemma':{
      req:{"map":{"psMap":{"map":{"rownum":MAX_ROW_ORD,"pss":[["id","entity1","id1","entity2","id2","ord","title"],["objName","objNo"]],"cns":["dao.hb.Rel","dao.hb.Lemma"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
	      defautdef:{
		      editor:"TextField"
		  },
		  propdef:{
	   	    'A.id':{
		 		display:'编号',
				cfg:{
					readOnly:true
				}
		 	},
	   	    'A.id2':{
		 		display:'文物编号',
				cfg:{
					readOnly:true
				}
		 	},
		  	'A.ord':{
		  		display:'排序'
		  	},
		  	'A.title':{
		  		display:'栏目名'
		  	},
		  	'B.lemmaName':{
		  		display:'文物词条'
		  	},
		  	'B.id':{
		  		display:'词条编号'
		  	}
		  },
		  grid:{
			cfg:{
				autoScroll:true,
				autoHeight:false,
				enableDragDrop: true
			},
		  	hide:["A.entity1","A.id1","A.entity2"],
		  	hidebtns_objview:[0,1],
		  	btns:['删除','保存'],
		      page:true
		  },
		  edit:{
			  	dlg:{width:600,height:360,title:'项目——词条详细信息'},
			   	tab:[{title:"项目——词条详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord","B.lemmaName","B.id"]}]}
		  ]
      }   
  },   
  'rel_doc_subject':{
      req:{"map":{"psMap":{"map":{"rownum":5,"pss":[["id","entity1","id1","entity2","id2","ord","title"],["name"]],"cns":["dao.hb.Rel","dao.hb.Subject"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
	      defautdef:{
		      editor:"TextField"
		  },
		  propdef:{
	   	    'A.id':{
		 		display:'编号',
				cfg:{
					readOnly:true
				}
		 	},
	   	    'A.id2':{
		 		display:'专题编号',
				cfg:{
					readOnly:true
				}
		 	},
		  	'A.ord':{
		  		display:'排序'
		  	},
		  	'A.title':{
		  		display:'栏目名'
		  	},
		  	'B.name':{
		  		display:'专题名'
		  	}
		  },
		  grid:{
		  	hide:["A.entity1","A.id1","A.entity2"],
		  	hidebtns_objview:[0,1],
		  	btns:['删除','保存'],
		      page:true
		  },
		  edit:{
			  	dlg:{width:600,height:360,title:'文稿——文物详细信息'},
			   	tab:[{title:"文稿——文物详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord","B.name"]}]}
		  ]
      }   
  },
  'rel_chanel_doc':{
		 req:{"map":{"psMap":{"map":{"rownum":5,"pss":[["id","entity1","id1","entity2","id2","ord","title"],["title"]],"cns":["dao.hb.Rel","dao.hb.Doc"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
		   defautdef:{
		   	 editor:"TextField"
		 },
		  propdef:{
	   	    'A.id':{
		 		display:'编号',
				cfg:{
					readOnly:true
				}
		 	},
	   	    'A.id2':{
		 		display:'文稿编号',
				cfg:{
					readOnly:true
				}
		 	},
		  	'A.ord':{
		  		display:'排序'
		  	},
		  	'A.title':{
		  		display:'栏目名'
		  	},
		  	'B.title':{
		  		display:'文稿题名'
		  	}
		  },
		 grid:{
		 	hide:["A.entity1","A.id1","A.entity2"],
		 	hidebtns_objview:[0,1],
		 	btns:['删除','保存'],
			page:true
		},edit:{
		  	dlg:{width:600,height:360,title:'频道——文稿详细信息'},
		   	tab:[{title:"频道——文稿详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord","B.title"]}]}
		   	] }   
	  },
  'rel_rarity_image':{
		 req:{"map":{"psMap":{"map":{"rownum":MAX_ROW_ORD,"pss":[["id","entity1","id1","entity2","id2","ord","title"],["imageName","cdlabel","imgFile","pathSmall"]],"cns":["dao.hb.Rel","dao.hb.Image"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
		   defautdef:{
		   	 editor:"TextField"
		 },
		  propdef:{
	   	    'A.id':{
		 		display:'编号',
				cfg:{
					readOnly:true
				}
		 	},
	   	    'A.id2':{
		 		display:'影像编号',
				cfg:{
					readOnly:true
				}
		 	},
		  	'A.ord':{
		  		display:'排序'
		  	},
		  	'A.title':{
		  		display:'栏目名'
		  	},
		  	'B.imageName':{
		  		display:'影像名称'
		  	}
		  },
		 grid:{
			renderfunc:render_func_dd,
			hide:["A.entity1","A.id1","A.entity2"],
		 	hidebtns_objview:[0,1],
		 	btns:['删除','保存'],
			page:true
		},edit:{
		  	dlg:{width:600,height:360,title:'文物——影像详细信息'},
		   	tab:[{title:"文物——影像详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord","B.imageName"]}]}
		   	] }   
	  },
  'rel_rarity_thesis':{
		 req:{"map":{"psMap":{"map":{"rownum":5,"pss":[["id","entity1","id1","entity2","id2","ord"],["thesisName"]],"cns":["dao.hb.Rel","dao.hb.Thesis"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
		   defautdef:{
		   	 editor:"TextField"
		 },
		  propdef:{
	   	    'A.id':{
		 		display:'编号',
				cfg:{
					readOnly:true
				}
		 	},
	   	    'A.id2':{
		 		display:'论文编号',
				cfg:{
					readOnly:true
				}
		 	},
		  	'A.ord':{
		  		display:'排序'
		  	},
		  	'B.thesisName':{
		  		display:'论文名称'
		  	}
		  },
		 grid:{
		 	hide:["A.entity1","A.id1","A.entity2"],
		 	hidebtns_objview:[0,1],
		 	btns:['删除','保存'],
			page:true
		},edit:{
		  	dlg:{width:600,height:360,title:'文物——论文详细信息'},
		   	tab:[{title:"文物——论文详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord","B.thesisName"]}]}
		   	] }   
	  },
  'rel_rarity_doc':{
		 req:{"map":{"psMap":{"map":{"rownum":10,"pss":[["id","entity1","id1","entity2","id2","ord","title"],["title"]],"cns":["dao.hb.Rel","dao.hb.Doc"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
		   defautdef:{
		   	 editor:"TextField"
		 },
		  propdef:{
	   	    'A.id':{
		 		display:'编号',
				cfg:{
					readOnly:true
				}
		 	},
	   	    'A.id2':{
		 		display:'文稿编号',
				cfg:{
					readOnly:true
				}
		 	},
		  	'A.ord':{
		  		display:'排序'
		  	},
		  	'A.title':{
		  		display:'栏目名',
		 		editor:"ComboBox",
		 		cfg:{
		 		   listWidth:100,
		 		   width:100,
			       store:getStore({hql:"select id,title from dao.hb.BaseReltitle  order by ord"}),
			        displayField:'name',
			        valueField:'name',
			        typeAhead: true,
			        mode: 'local',
			        triggerAction: 'all',
			        emptyText:'...',
			        selectOnFocus:true
		        }		  		
		  	},
		  	'B.title':{
		  		display:'文稿题名'
		  	}
		  },
		 grid:{
		 	hide:["A.entity1","A.id1","A.entity2"],
		 	hidebtns_objview:[0,1],
		 	btns:['删除','保存'],
			page:true
		},edit:{
		  	dlg:{width:600,height:360,title:'文物——文稿详细信息'},
		   	tab:[{title:"文物——文稿详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord","B.title"]}]}
		   	] }   
	  },
  'rel_building_doc':{
		 req:{"map":{"psMap":{"map":{"rownum":5,"pss":[["id","entity1","id1","entity2","id2","ord"],["title"]],"cns":["dao.hb.Rel","dao.hb.Doc"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
		   defautdef:{
		   	 editor:"TextField"
		 },
		  propdef:{
	   	    'A.id':{
		 		display:'编号',
				cfg:{
					readOnly:true
				}
		 	},
	   	    'A.id2':{
		 		display:'文稿编号',
				cfg:{
					readOnly:true
				}
		 	},
		  	'A.ord':{
		  		display:'排序'
		  	},
		  	'B.title':{
		  		display:'文稿题名'
		  	}
		  },
		 grid:{
		 	hide:["A.entity1","A.id1","A.entity2"],
		 	hidebtns_objview:[0,1],
		 	btns:['删除','保存'],
			page:true
		},edit:{
		  	dlg:{width:600,height:360,title:'古建——文稿详细信息'},
		   	tab:[{title:"古建——文稿详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord","B.title"]}]}
		   	] }   
	  },
   'rel_building_image':{
		 req:{"map":{"psMap":{"map":{"rownum":5,"pss":[["id","entity1","id1","entity2","id2","ord"],["imageName"]],"cns":["dao.hb.Rel","dao.hb.Image"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
		   defautdef:{
		   	 editor:"TextField"
		 },
		 propdef:{
   	    	"A.id":{
	 			display:'关联id',
				cfg:{
					readOnly:true
				}
	 		},
	 		"A.id1":{
	 			display:'古建id'
	 		},
	 		"A.id2":{
	 			display:'影像id'
	 		},
	 		"A.ord":{
	 			display:'排序'
	 		},
	 		"B.imageName":{
	 			display:'影像名称'
	 		}
		 },		 
		 grid:{
			hide:["A.entity1","A.id1","A.entity2"],
			hidebtns_objview:[0,1],
		 	btns:['删除','保存'],
			page:true
		 },
		 edit:{
		  	dlg:{width:600,height:360,title:'古建——影像详细信息'},
		   	tab:[{title:"古建——影像详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord","B.imageName"]}]}]
		 }   
	  },	  
  'rel_building_thesis':{
		 req:{"map":{"psMap":{"map":{"rownum":5,"pss":[["id","entity1","id1","entity2","id2","ord"],["thesisName"]],"cns":["dao.hb.Rel","dao.hb.Thesis"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
		   defautdef:{
		   	 editor:"TextField"
		 },
		  propdef:{
	   	    'A.id':{
		 		display:'编号',
				cfg:{
					readOnly:true
				}
		 	},
	   	    'A.id2':{
		 		display:'论文编号',
				cfg:{
					readOnly:true
				}
		 	},
		  	'A.ord':{
		  		display:'排序'
		  	},
		  	'B.thesisName':{
		  		display:'论文名称'
		  	}
		  },
		 grid:{
		 	hide:["A.entity1","A.id1","A.entity2"],
		 	hidebtns_objview:[0,1],
		 	btns:['删除','保存'],
			page:true
		},edit:{
		  	dlg:{width:600,height:360,title:'古建——论文详细信息'},
		   	tab:[{title:"古建——论文详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord","B.thesisName"]}]}
		   	] }   
	  },
  'rel_figure_thesis':{
		 req:{"map":{"psMap":{"map":{"rownum":5,"pss":[["id","entity1","id1","entity2","id2","ord"],["thesisName"]],"cns":["dao.hb.Rel","dao.hb.Thesis"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
		   defautdef:{
		   	 editor:"TextField"
		 },
		  propdef:{
	   	    'A.id':{
		 		display:'编号',
				cfg:{
					readOnly:true
				}
		 	},
	   	    'A.id2':{
		 		display:'论文编号',
				cfg:{
					readOnly:true
				}
		 	},
		  	'A.ord':{
		  		display:'排序'
		  	},
		  	'B.thesisName':{
		  		display:'论文名称'
		  	}
		  },
		 grid:{
		 	hide:["A.entity1","A.id1","A.entity2"],
		 	hidebtns_objview:[0,1],
		 	btns:['删除','保存'],
			page:true
		},edit:{
		  	dlg:{width:600,height:360,title:'人物——论文详细信息'},
		   	tab:[{title:"人物——论文详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord","B.thesisName"]}]}
		   	] }   
	  },
   'rel_figure_image':{
		req:{"map":{"psMap":{"map":{"rownum":5,"pss":[["id","entity1","id1","entity2","id2","ord"],["imageName"]],"cns":["dao.hb.Rel","dao.hb.Image"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
		   defautdef:{
		   	 editor:"TextField"
		},
		propdef:{
   	    	"A.id":{
	 			display:'关联id',
				cfg:{
					readOnly:true
				}
	 		},
	 		"A.id1":{
	 			display:'人物id'
	 		},
	 		"A.id2":{
	 			display:'影像id'
	 		},
	 		"A.ord":{
	 			display:'排序'
	 		},
	 		"B.imageName":{
	 			display:'影像名称'
	 		}
		},
		grid:{
			hide:["A.entity1","A.id1","A.entity2"],
			hidebtns_objview:[0,1],
		 	btns:['删除','保存'],
			page:true
		},
		edit:{
		  	dlg:{width:600,height:360,title:'人物——影像详细信息'},
		   	tab:[{title:"人物——影像详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord","B.imageName"]}]}
		   	] }   
	  },
   'rel_figure_contribution':{
		req:{"map":{"psMap":{"map":{"rownum":5,"pss":[["id","entity1","id1","entity2","id2","ord"],["conName"]],"cns":["dao.hb.Rel","dao.hb.Contribution"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
		   defautdef:{
		   	 editor:"TextField"
		},
		propdef:{
   	    	"A.id":{
	 			display:'关联id',
				cfg:{
					readOnly:true
				}
	 		},
	 		"A.id1":{
	 			display:'人物id'
	 		},
	 		"A.id2":{
	 			display:'捐献物id'
	 		},
	 		"A.ord":{
	 			display:'排序'
	 		},
	 		"B.conName":{
	 			display:'捐献物名称'
	 		}
		},
		grid:{
			hide:["A.entity1","A.id1","A.entity2"],
			hidebtns_objview:[0,1],
		 	btns:['删除','保存'],
			page:true
		},
		edit:{
		  	dlg:{width:600,height:360,title:'人物——捐献物信息'},
		   	tab:[{title:"人物——捐献物信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord","B.conName"]}]}
		   	] }   
	  },	  
   'rel_book_image':{
		req:{"map":{"psMap":{"map":{"rownum":MAX_ROW_ORD,"pss":[["id","entity1","id1","entity2","id2","ord"],["imageName","cdlabel","imgFile","pathSmall"]],"cns":["dao.hb.Rel","dao.hb.Image"],
		"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
		   defautdef:{
		   	 editor:"TextField"
		},
		propdef:{
   	    	"A.id":{
	 			display:'关联id',
				cfg:{
					readOnly:true
				}
	 		},
	 		"A.id1":{
	 			display:'图书id'
	 		},
	 		"A.id2":{
	 			display:'影像id'
	 		},
	 		"A.ord":{
	 			display:'排序'
	 		},
	 		"B.imageName":{
	 			display:'影像名称'
	 		},
		 	"B.pathSmall":{
		 		display:"小影像",
					renderer:function(itxt,r,col,l){
					 var obj = col.data;
					 var path = obj["B.cdlabel"].replace(/\./g,'/')+"/"+obj["B.imgFile"]+"[126PX].jpg";
			    	 var url=Bat.Host+"/files/image/"+path;
					 return "<a href=\""+url+"\" target=\"_blank\">"+path+"</a>";
				}
		 	}
		},
		grid:{
			renderfunc:render_func_dd,
			hide:["A.entity1","A.id1","A.entity2","B.cdlabel","B.imgFile"],
			hidebtns_objview:[0,1],
		 	btns:['删除','保存'],
			page:true
		},
		edit:{
		  	dlg:{width:600,height:360,title:'人物——影像详细信息'},
		   	tab:[{title:"人物——影像详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord","B.imageName"]}]}
		   	] }   
	  },	  
   'rel_publication_image':{
		req:{"map":{"psMap":{"map":{"rownum":5,"pss":[["id","entity1","id1","entity2","id2","ord"],["imageName"]],"cns":["dao.hb.Rel","dao.hb.Image"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
		   defautdef:{
		   	 editor:"TextField"
		},
		propdef:{
   	    	"A.id":{
	 			display:'关联id',
				cfg:{
					readOnly:true
				}
	 		},
	 		"A.id1":{
	 			display:'出版物id'
	 		},
	 		"A.id2":{
	 			display:'影像id'
	 		},
	 		"A.ord":{
	 			display:'排序'
	 		},
	 		"B.imageName":{
	 			display:'影像名称'
	 		}
		},
		grid:{
			hidebtns_objview:[0,1],
		 	btns:['删除','保存'],
			page:true
		},
		edit:{
		  	dlg:{width:600,height:360,title:'出版物——影像详细信息'},
		   	tab:[{title:"出版物——影像详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord","B.imageName"]}]}
		   	] }   
	  },	  	  
   'rel_subject_attach':{
		req:{"map":{"psMap":{"map":{"rownum":5,"pss":[["id","entity1","id1","entity2","id2","ord","title"],["name","path"]],"cns":["dao.hb.Rel","dao.hb.CeAttachment"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
		   defautdef:{
		   	 editor:"TextField"
		},
		propdef:{
   	    	"A.id":{
	 			display:'关联id',
				cfg:{
					readOnly:true
				}
	 		},
	 		"A.id1":{
	 			display:'主id'
	 		},
	 		"A.id2":{
	 			display:'附件id'
	 		},
	 		"A.title":{
	 			display:'关联描述'
	 		},
	 		"A.ord":{
	 			display:'排序'
	 		},
	 		"B.name":{
	 			display:'附件名称'
	 		},			
	 		"B.path" : {
				display : '路径',
				renderer:function(itxt,r,col,l){
				 if(!itxt) return "";
				 if(itxt.indexOf('\\')!=-1){
				   var url=Bat.Host+"/upload/"+itxt.replace(/\\/g,'/'); 
				   return "<a href=\""+url+"\" target=\"_blank\">"+itxt+"</a>";;
				 }
		       	 var pos1 = itxt.indexOf('[');
		       	 var pos2 = itxt.indexOf(']');
		       	 if(pos1==-1 || pos2==-1)
		       	   return "";
		       	 pos2 = itxt.lastIndexOf('~',pos2);
		       	 var sp = itxt.substring(pos1+1,pos2).replace(/~/g,'/');
		       	 var suffix = col.data.suffix;
		       	 var spec = col.data.spec;
		       	 if(spec&&spec.trim()!='')
		       	   sp=spec+'/'+sp;
		       	 if(suffix&&suffix.trim()!='')
		       	   sp=suffix+'/'+sp;
		       	 //var suffix=itxt.substr(itxt.length-4).toLowerCase();
		    	 var url=Bat.Host+"/upload/"+sp+"/"+itxt;
				 return "<a href=\""+url+"\" target=\"_blank\">"+itxt+"</a>";
				}
			}
		},
		grid:{
			hide:["A.entity1","A.id1","A.entity2"],
			hidebtns_objview:[0,1],
		 	btns:['删除','保存'],
			page:true
		},
		edit:{
		  	dlg:{width:600,height:360,title:'专题——附件详细信息'},
		   	tab:[{title:"专题——附件详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord","B.name"]}]}
		   	] }   
	  },	  	  
   'rel_doc_figure':{
		req:{"map":{"psMap":{"map":{"rownum":5,"pss":[["id","entity1","id1","entity2","id2","ord","title"],["objName"]],"cns":["dao.hb.Rel","dao.hb.Figure"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
		   defautdef:{
		   	 editor:"TextField"
		},
		propdef:{
   	    	"A.id":{
	 			display:'关联id',
				cfg:{
					readOnly:true
				}
	 		},
	 		"A.id1":{
	 			display:'主id'
	 		},
	 		"A.id2":{
	 			display:'从id'
	 		},
	 		"A.ord":{
	 			display:'排序'
	 		},
	 		"A.title":{
	 			display:'栏目名'
	 		},
	 		"B.objName":{
	 			display:'人物名称'
	 		}
		},
		grid:{
			hide:["A.entity1","A.id1","A.entity2"],
			hidebtns_objview:[0,1],
		 	btns:['删除','保存'],
			page:true
		},
		edit:{
		  	dlg:{width:600,height:360,title:'文稿——人物详细信息'},
		   	tab:[{title:"文稿——人物详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord","B.objName"]}]}
		   	] }   
	  },	  	  
   'rel_doc_audiovideo':{
		req:{"map":{"psMap":{"map":{"rownum":5,"pss":[["id","entity1","id1","entity2","id2","ord","title"],["name","url"]],"cns":["dao.hb.Rel","dao.hb.AudioVideo"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
		   defautdef:{
		   	 editor:"TextField"
		},
		propdef:{
   	    	"A.id":{
	 			display:'关联id',
				cfg:{
					readOnly:true
				}
	 		},
	 		"A.id1":{
	 			display:'主id'
	 		},
	 		"A.id2":{
	 			display:'音视频id'
	 		},
	 		"A.ord":{
	 			display:'排序'
	 		},
	 		"A.title":{
	 			display:'栏目名'
	 		},
	 		"B.name":{
	 			display:'音视频名称'
	 		},
	 		"B.url":{
	 			display:'音视频地址'
	 		}
		},
		grid:{
			hide:["A.entity1","A.id1","A.entity2"],
			hidebtns_objview:[0,1],
		 	btns:['删除','保存'],
			page:true
		},
		edit:{
		  	dlg:{width:600,height:360,title:'文稿——音视频详细信息'},
		   	tab:[{title:"文稿——音视频详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord"]}]}
		   	] }   
	  },	  	  
   'rel_doc_gift':{
		req:{"map":{"psMap":{"map":{"rownum":5,"pss":[["id","entity1","id1","entity2","id2","ord","title"],["name"]],"cns":["dao.hb.Rel","dao.hb.AudioVideo"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
		   defautdef:{
		   	 editor:"TextField"
		},
		propdef:{
   	    	"A.id":{
	 			display:'关联id',
				cfg:{
					readOnly:true
				}
	 		},
	 		"A.id1":{
	 			display:'主id'
	 		},
	 		"A.id2":{
	 			display:'礼品id'	 			
	 		},
	 		"A.ord":{
	 			display:'排序'
	 		},
	 		"A.title":{
	 			display:'栏目名'
	 		},
	 		"B.name":{
	 			display:'礼品名称'
	 		}
	 	},
		grid:{
			hide:["A.entity1","A.id1","A.entity2"],
			hidebtns_objview:[0,1],
		 	btns:['删除','保存'],
			page:true
		},
		edit:{
		  	dlg:{width:600,height:360,title:'文稿——音视频详细信息'},
		   	tab:[{title:"文稿——音视频详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord"]}]}
		   	] }   
	  },	  	  
   'rel_doc_building':{
		req:{"map":{"psMap":{"map":{"rownum":5,"pss":[["id","entity1","id1","entity2","id2","ord","title"],["objName"]],"cns":["dao.hb.Rel","dao.hb.Building"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
		   defautdef:{
		   	 editor:"TextField"
		},
		propdef:{
   	    	"A.id":{
	 			display:'关联id',
				cfg:{
					readOnly:true
				}
	 		},
	 		"A.id1":{
	 			display:'主id'
	 		},
	 		"A.id2":{
	 			display:'被关联id'
	 		},
	 		"A.ord":{
	 			display:'排序'
	 		},
	 		"A.title":{
	 			display:'栏目名'
	 		},
	 		"B.objName":{
	 			display:'建筑名称'
	 		}
	 	},
		grid:{
			hide:["A.entity1","A.id1","A.entity2"],
			hidebtns_objview:[0,1],
		 	btns:['删除','保存'],
			page:true
		},
		edit:{
		  	dlg:{width:600,height:360,title:'文稿——建筑详细信息'},
		   	tab:[{title:"文稿——建筑详细信息",fset:[{legend:" ",props:["A.id","A.entity1","A.id1","A.entity2","A.id2","A.ord"]}]}
		   	] }   
	  },	  	  
  'rel':{
		 req:{"map":{"psMap":{"map":{"rownum":5,"pss":[["id","entity1","id1","entity2","id2"]],"cns":["dao.hb.Rel"],"hql":"from dao.hb.Rel A"},"javaClass":"java.util.HashMap"},"SN":null},"javaClass":"java.util.HashMap"},
		   defautdef:{
		   	 editor:"TextField"
		   },
		 grid:{
			 page:true
		}   
	  }
}

